Anonymous - 2011-08-12

I have downloaded a Google Docs spreadsheet as a CSV file and when I try to
read it with

new CsvMapReader(new FileReader("table.csv"),
CsvPreference.STANDARD_PREFERENCE)

...

names = csv.getCSVHeader(true)

... csv.read(names)

I get an exception

"The namemapper array and the value list must match in size. Number of columns
mismatch number of entries for your map."

First, this is not a helpful exception message because it does not indicate in
what line the exception occurs, or what the required vs. actual lengths are. I
had to open the source and step into it in the debugger to find out the
problem.

Please add an option to be more forgiving. In this case the Google Docs
generated CSV "truncates" lines

that don't have data, so its is common for a line to have fewer fields than
the header. SuperCVS should

have a policy or field in the Preferences to silently add missing columns or
truncate extra columns

Perhaps there can be default values, or the reader can provide a query to
indicate if the current

line's number of fields did not match the header.