When exporting to csv from Excel, the cells that contain commas, double quotes 
and/or carriage returns will be wrapped by double quotes. The routine that is 
used to import csv file should be paying attention to the surrounding quotes 
and handling embedded returns. Any internal double quotes are escaped as double 
double quotes (pulling that from memory).

The following is a sample of a 3 row csv file exported from Excel.:
ROW 1,a,b,c
ROW2, 1,"2
3",4
ROW 3,d,e,f

Them 3rd cell in ROW 2 has a carriage return between the 2 and 3.

It is more of a challenge to import CSV because you can’t assume that the EOL 
character is truly the EOL. It might be embedded within a cell. if you are 
using CSV files you need to be able to handle this scenario.

Hopefully that helps a bit.

Dani


> On Mar 7, 2018, at 2:20 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Keith - if you export from Excel to csv, you still have the problem with
> embedded Return characters.
> 
> Pat
> 
> 
> On 7 March 2018 at 20:48, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> Ferdinando ,
>> If you convert the Excel file to csv, you shouldn't have any problems with
>> cells containing carriage returns/line feeds when you import into 4D.
>> I assume 4D’s built-in import can handle csv files - I haven’t checked -
>> we use special import and export code to handle csv so we don’t use 4D’s
>> built-in stuff.
>> 
>> Sometimes an Excel csv export doesn’t comply completely with the cvs
>> rules, but mostly it does.
>> HTH, Keith
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **********************************************************************
>> 
> 
> 
> 
> -- 
> *************************************************
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to