MobileSheets Forums

Full Version: Quoted page numbers in CSV import (and workaround)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
An odd little problem: in imported CSV files (with PDF), it seems like page numbers can be quoted, or not quoted, for all entries, but a mixture causes problems.

Of the three samples attached (same data, different delimiters), the 'full quotes' and 'no quotes' versions all get imported as expected, with sensible values for all fields. However, the 'partial quotes' one gets read ok for the first three entries (quoted page ranges), but MSP reports "Pages: 1-1" for all the subsequent, single pages, which are unquoted in the CSV. And subsequent data values on the same line appear in the wrong variable (i.e. genre data appears as 'source type').

Obviously no sensible person would create a CSV with inconsistent delimiters, but the situation arises because of spreadsheet formatting and export filters. LibreOffice (and Excel IIRC) CSV export filters have the option to quote text, which doesn't quote numeric values (e.g. 14). However, page ranges (1-11) have to be entered/formatted as text (otherwise can get treated as dates), which means they get quoted on export, when actual numbers don't.

It's probably very marginal and niche case, so maybe not a high priority, and a couple of workarounds work in case anyone encounters this situation:

1. Don't use " text delimiters on exporting the CSV. I do it for caution, just in case any entries contain semicolons.

2. Format the spreadsheet column containing page numbers as 'Text'. which then ensures all get treated as text and fully quoted.

(MSP Android, v.3.1.8)
That's nothing that has to be handled by MSP.
As you already stated: don't use inconsistent CSVs.
If you use either semicolon or tab as field separator, quoting text should not be necessary. You can easily avoid that tabs or semicolons occur within field texts.
To test if a CSV is valid just open it in e.g. Libre Office Calc. If it contains misplaced field separators it will be shown obviously and it's a snap to correct them.