austenpma / csvfix

Automatically exported from code.google.com/p/csvfix
MIT License
0 stars 0 forks source link

Option for adding headers in output files from file_split #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There should be option in file_split to include input files headers in output 
files. 

For example:
input.txt:
Header1;Header2
123;123
321;123

csvfix file_split -f 1 -ifn -sep ';' input.txt

will produce two files:

file_0001.csv:
123;123

file_0001.csv:
321;123

without the file header part ("Header1;Header2")

Original issue reported on code.google.com by mer...@gmail.com on 21 Aug 2013 at 11:49

GoogleCodeExporter commented 8 years ago
There are a lot of problems with the header record in CSVfix, and these can't 
easily be fixed in the current version (and maybe not in later versions - for 
example, what happens if you are using multiple files and the files have 
different header records?) I am therefor deferring all header record issues to 
CSVfix 2.0 (should I ever write it) and/or until I can come up with a better 
understanding of how to deal with the general problem of multiple, different 
header records.

Original comment by nbutterworth1953@gmail.com on 22 Aug 2013 at 3:42

GoogleCodeExporter commented 8 years ago
The multiple, different header records problem does not apply to the file_split 
command since all output files would use the same exact header as the source 
file.

Original comment by chlorap...@gmail.com on 17 Feb 2014 at 1:38