Re: STRSPLIT and .csv files [message #76993] |
Tue, 19 July 2011 03:41 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Am 19.07.2011 12:30, schrieb Fabzou:
> Dear IDLers,
>
> Rather than doing it by myself I am using the "lazy option" wich is
> asking you, my apologies.
>
> I have a .csv file that I read like this:
>
> readf, lun, line
> els = STRSPLIT(line, ',' ,/EXTRACT, /PRESERVE_NULL)
>
> But in the csv file there are some http address that are put between ""
> and that sometimes contain commas. What would be an elegant way to learn
> STRSPLIT to ignore the commas that are present between "", or is there a
> tool that makes it already?
>
> Thanks a lot!
>
> Fab
>
>
May be use one of idl builtins
Result = READ_CSV( Filename [, COUNT=variable] [, HEADER=variable] [,
MISSING_VALUE=value] [, N_TABLE_HEADER=value] [, NUM_RECORDS=value] [,
RECORD_START=value] [, TABLE_HEADER=variable])
Reimar
|
|
|