Hi:
I have a table with 5,000+ rows that I'm exporting to a CSV file and then importing into a library catalog. Until today, it imported without any problems.
Today, I added HTML code to the columns that contain hyperlinks so that they will open when they are clicked. The links work.
The problem is only about 10% of the rows are now imported. The other records say "Column Count Mismatch." From comparing the rows in Notepad, I can see that the rows that were not imported have a different column count, as delineated by commas, than the imported columns.
A couple of things are worth noting:
1) In the export file, the column count varies from row to row. (A full row contains 13 columns. Some columns have 8 or 13 or 12... which of course is the problem.)
2) The rows that import are not necessarily consecutive. For example, it may import rows 10-13, not import 14-19 but import 20-22...
When I look at the file as it was prior to putting in my html code, each row has 13 columns. The only difference seems to be the number of commas but there are no commas in the code that I inserted. Also, literally thousands of the records that were unaltered by the html code insertion now have the wrong number of columns.
Any help would be greatly appreciated.
Ethan
Excels output of csv data can cause problems as it drops commas for empty cells rather than outputting consitent number of commas per record.
You can work around this by either,
adding a final column that contains a value
or
adding a final row that contains values for each field
The problem with both options is the next program that imports the csv has to know to ignore the helper row/column.
If that doesn't work can you post small example file to demonstrate the problem.
Andy,
Ultimately, I put a row with every column filled in at the bottom of the spreadsheet and a column with every row filled in after the final column. It worked.
Thank you very much. The problem had me completely baffled until I read your message.
Best regards,
Ethan
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks