Split a CSV by Data Records and Repeat the Header in Every File
Divide a headered CSV into smaller files without cutting through a quoted multiline field. Set the number of data records per file, keep their source order and include the original header in each part.
Complete the task
- Read a headered CSV or TSV with the correct delimiter. Review the parsed data-row count rather than relying on the number of physical text lines.
- Set Data rows per file to a whole number from 1 to 20,000. The header is additional and does not count toward that value; choose a size that produces no more than 100 files.
- Split into files, inspect the total and download each numbered part. Review the export protection and optional UTF-8 BOM before downloading. Parts are comma-delimited CSV even when the input uses another separator.
Worked example
The built-in order table has 5 data records. Keep the default size of 2 and split to produce part-001.csv, part-002.csv and part-003.csv with 2, 2 and 1 data records respectively. Each file also contains the four-column header. The repeated 00101 order appears in part-002 because splitting preserves source order and does not deduplicate. A line break inside a quoted field belongs to that record and does not consume another record slot.
Method and limits
This is a record-count split, not a byte-size, group-by-column or Excel worksheet split. The source must have a consistent header and row width and fit within 5 MiB, 20,000 data records, 200 columns and 250,000 cells including headers. At most 100 parts can be created; increase the rows per file if necessary. A header-only table produces no parts. Download each part separately; no ZIP archive is generated. Optional export protection starts enabled and can prefix formula-like values, including negative numbers, with an apostrophe. CSV output cannot enforce Excel cell types, and delimiters or line endings can differ from the source.
Only settings explicitly saved by you may persist. Input and results remain in page memory. Local file handling and privacy.