05-20-2021, 07:33 AM
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)
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)