comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » READ_CSV: just one data field (=one column)?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
READ_CSV: just one data field (=one column)? [message #85578] Mon, 19 August 2013 01:20 Go to previous message
Therese is currently offline  Therese
Messages: 5
Registered: May 2013
Junior Member
Hello all,

I have a big problem with reading in a CSV file (comma delimited) created by Excel 2010. It contains various data (string, float, integer) in the columns and also has the column names in the first row.

My problem: READ_CSV read my *.csv but contains the whole row in one element of the result structure

Below I want to show you a minimum example with two columns of different data types and the column names "column1" and "column2"

XLSX-file:
column1 column2
row1 1
row2 2
row3 3
row4 4

CSV-file
column1;column2
row1;1
row2;2
row3;3
row4;4

for QUERY_CSV I get
IDL> test = QUERY_CSV(csvfile,info)
IDL> print,info
{ filepath*.csv CSV 5 1}

therefore, my resulting structure also contains just one field:
IDL> result = READ_CSV(csvfile, HEADER=head)
IDL> help,result
** Structure <27fbef0>, 1 tags, length=60, data length=60, refs=1:
FIELD1 STRING Array[5]

What am I doing wrong? Maybe, there is a problem in creating the CSV-file? Please help me!

Best regards,
Therese
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Progress Bar - Cancel button problem
Next Topic: Tooltip for CW_BGROUP?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:59:32 PDT 2025

Total time taken to generate the page: 0.47897 seconds