I'm writing a couple of programs to unstring a comma seperated variable (CSV) file.
The first file contains a name and ssn seperated by a comma (no ending delimiter present). This file unstrings as I expect into the two fields, even though there is no ending delimiter.
The second file is supposed to contain 17 fields, however when I save the Excel spreadsheet as a .CSV file half of the records have ending commas and the other half do not. The records with the ending comma read in just fine with the unstring command, but the ones without the ending comma lose the last field. I expected the same result that I got with the first file for records without the ending delimiter.
Any thoughts as to why this happens? I need to fix without the end user manipulating the data file.
The first file contains a name and ssn seperated by a comma (no ending delimiter present). This file unstrings as I expect into the two fields, even though there is no ending delimiter.
The second file is supposed to contain 17 fields, however when I save the Excel spreadsheet as a .CSV file half of the records have ending commas and the other half do not. The records with the ending comma read in just fine with the unstring command, but the ones without the ending comma lose the last field. I expected the same result that I got with the first file for records without the ending delimiter.
Any thoughts as to why this happens? I need to fix without the end user manipulating the data file.