Skip to content

thatblairguy/csv-splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

csv-splitter

Quick and dirty script to split a comma-separated value file into multiple smaller files. The very first line is assumed to contain column headers and is copied as the first row of each output file.

NOTE: This script assumes that each record is represented by exactly one line in the in the .CSV file. There is no handling for line-breaks.

To execute, run

powershell .\csv-splitter.ps1 -fileName <INPUT>.csv 

where:

<INPUT> is the file being split.

To adjust the number of lines in the output files, edit the $maxLines variable on line 6.

Based on answers to https://stackoverflow.com/q/1001776

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors