/P# |
Meaning |
Extra Parameters: /1{Parameter1} /n{Nth Parameter} |
208 |
(CSV) Trim excess commas |
NONE |
Additional Notes: This special process is used to remove excess commas from a CSV file. Those commas after the last piece of valid data will be removed. For example the file before applying this process looks like:
Data1,Data2,Data3,Data4,,,
,, ,
Data1,Data2,Data3,Data4,,,
Data1,Data2,Data3,Data4
After applying this process it looks like:
Data1,Data2,Data3,Data4
,,
Data1,Data2,Data3,Data4
Data1,Data2,Data3,Data4
Data1,Data2,Data3,Data4
Notice the space character, though not shown in row 2, column 2, is valid data.
To remove control the excess commas in file D:\CSVFiles\Simple.CSV, the following syntax would be used:
ConvertXLS.EXE /S"D:\CSVFiles\Simple.CSV" /T"D:\CSVFiles\Simple.CSV" /P208
The /S and /T switches specify input and output workbook respectively, which in this case is the same workbook. You can optionally keep the input file unchanged by specifying a different name or path for the output file.