CSV import

Willem Ferguson willemferguson at zoology.up.ac.za
Wed Jan 7 08:23:40 PST 2015


On 07/01/2015 17:25, Dirk Hohndel wrote:
>
> 6m     5 min
>
> 4.5m       13 min
>
> Total run time: 41 minutes
>
> The dive notes are given, 1 line at a time, in the import table (see
> attached screenshot 2). Result is that each dive takes several rows of space
> in the import table: impossible to parse for import.
> That simply is an invalid format.
>
>
What is the limitation with repect to the notes? It is plain hand-typed 
text with LF line terminators, admittedly also with tab characters 
included which could confuse the parser with respect to delimiters. 
Nothing fancy. What about about taking the text from the Notes text box, 
deal with it as a long multiline null-terminated string, strip out any 
characters that conflict with the CSV formatting and store it in the CSV 
file as one long delimited string. That should allow the retention of 
tabs and LF characters. Or am I, as frequently, overlooking something basic?

Look at this dive note:
Today we dived "Mark's Horrible Hole" and his "Potato grouper" turned 
out to be a large juvenile coral cod.
I tried this and it appears that the text is parsed correctly, although 
I can only see the first 12 characters of the string in the import 
table, due to the problem with the first row of the table. At least, no 
other contents of the import table appear to be displaced.
Kind regards,
willem




More information about the subsurface mailing list