Split one big spreadsheet into many files — either one file per category (e.g. per region, client, or month) or into fixed-size chunks of N rows. The exact inverse of merging.
Built for the everyday request: "split this master sheet into a separate file for each ___."
📖 New here? Read the full step-by-step guide: How to Split an Excel File Into Multiple Files on ExcelGuru.io.
- 🗂️ Split by column — one file per unique value (
--by region) - ✂️ Split by row count — fixed-size chunks (
--rows 1000) - 📤 Output as
.xlsxor.csv - 🏷️ Safe, readable file names generated from the column values
- 🧩 Reads
.csv,.xlsx,.xls
git clone https://github.com/Synth88Labs/excel-tool-splitter.git
cd excel-tool-splitter
pip install -r requirements.txtRequires Python 3.9+.
python split_excel.py <input> --by COLUMN [-o out_dir] [--format xlsx|csv]
python split_excel.py <input> --rows N [-o out_dir] [--format xlsx|csv]# One file per region
python split_excel.py sample_data/sales.csv --by region -o split_output
# Chunks of 4 rows each, as CSV
python split_excel.py sample_data/sales.csv --rows 4 -o chunks --format csv| Option | Description |
|---|---|
--by COLUMN |
Split into one file per unique value in COLUMN |
--rows N |
Split into chunks of N rows each |
-o, --output-dir |
Folder for the output files. Default: split_output |
--format |
xlsx or csv. Default: xlsx |
--prefix |
Optional prefix for output file names |
--sheet NAME |
For Excel input, read a specific sheet (default: first) |
--by and --rows are mutually exclusive — pick one mode per run.
Splitting sales.csv with --by region produces:
split_output/
West.xlsx
East.xlsx
North.xlsx
South.xlsx
Each file contains only that region's rows.
Split and merge are two halves of the same job:
python split_excel.py all_clients.xlsx --by client # split one -> many
python merge_excel.py ./client_files -o combined.csv # many -> one (excel-tool-merger)→ Excel/CSV Merger · Excel Report Generator · Excel Data Cleaner
pip install pytest
python -m pytestLevel up your Excel and automation skills with free, practical guides at ExcelGuru.io — formulas, automation, VBA, and more.
👉 Browse all free Excel tutorials on ExcelGuru.io »
MIT — see LICENSE.