CSV Troubles: The rows are not all the same number of columns

An .ods import file I have used previously is now not accepted by CSV with the strange complaint:
“The rows are not all the same number of columns.”

There are empty cells on some rows, which were accepted previously, but as far as I can tell no rogue columns. What’s going on?

Omeka-s v 4.0.4
PHP 7.4.3-4ubuntu2.20
CSV 2.6.1

Empty cells should be fine, but this error is triggered instead when there are different numbers of cells on some rows (in other words, the CSV is not “rectangular” in shape, there are more commas and therefore more cells on at least one row).

Maybe you used different settings previously? Or the file has changed?

thanks for reply…

Your description led me to select the 132 row x 19 column array, copy it as text only to a new sheet, and hand that new sheet to CSV Import. It worked.

In OpenDocumentSpreadsheet.php where the problem is detected, PHP knows which row has data beyond the last column with a header. It would help if the error report told us which row to look at for rogue data off to the right.

1 Like