Package 'splitr'

Title: Fast Utilities for Splitting Excel Sheets
Description: Provides a fast function for splitting large Excel sheets into multiple smaller sheets using the openxlsx package.
Authors: Daniel Amah [aut, cre]
Maintainer: Daniel Amah <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-05-26 10:25:44 UTC
Source: https://github.com/akanimohod19a/splitr

Help Index


Split Excel Sheet into Multiple Sheets

Description

Reads a source Excel file and splits rows into multiple sheets.

Usage

split_excel_to_sheets(
  file_path,
  n,
  sheet = 1,
  output_path = NULL,
  sheet_prefix = "Part",
  header_style = TRUE,
  col_widths = "auto"
)

Arguments

file_path

Path to source .xlsx file

n

Number of chunks to split

sheet

Sheet name or index

output_path

Optional path to save workbook

sheet_prefix

Prefix for sheet names

header_style

Logical, apply header style

col_widths

Column widths (numeric or "auto")

Value

An openxlsx workbook object

Examples

## Not run: 
file <- system.file("extdata", "example.xlsx", package = "splitr")
wb <- split_excel_to_sheets(file_path = file, n = 2)
openxlsx::saveWorkbook(wb, "split_example.xlsx", overwrite = TRUE)

## End(Not run)