LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open CSV files in Excel through labview

Highlighted
   Dear,
 
Am not famillar with *.csv files but I would like to know if it's possible to : open a CSV files in excel through labview.
I can't used ActiveX for my application. This application is on Labview 8.2
 
Regards
 
  Massif
0 Kudos
Message 1 of 7
(3,281 Views)
CSV files are just comma-delimited text files, and you can just use the regular File I/O functions to read the files into LabVIEW, like Read From Spreadsheet File. Just specify the delimiter as a comma.
0 Kudos
Message 2 of 7
(3,274 Views)
Hi Massif,

a .csv file is a spreadsheet file, so use the "open spreadsheet file" VI.

Cheers

Edit:
Dang, I'm always 30seconds behind you smercurrio! Smiley Very Happy


Message Edited by lmtis on 04-22-2008 10:27 AM
Jim

LV 2013
0 Kudos
Message 3 of 7
(3,273 Views)

Dear Imtis and Smercurrio,

Thank you for your response but I have an other need.
I have to redonne my question:

I would like open a CSV file into Excel. But I would like control this opennig with Labview.
   Massif

0 Kudos
Message 4 of 7
(3,255 Views)
In that case, since you don't want to use ActiveX you will need to use the System Exec VI to launch Excel and pass it the CSV file as an argument. For example:

Note that your path to Excel will vary depending on which version you have installed.


Message Edited by smercurio_fc on 04-22-2008 11:26 AM
Message 5 of 7
(3,241 Views)

Dear smercurio_fc,

 

Thanks for your help. This solution is working and we solve the problem. 😃

0 Kudos
Message 6 of 7
(1,258 Views)

If you have the Report Generation Toolkit, you can also use that to open a CSV file in Excel.  Here is a little test routine that (a) generates a CSV file using LabVIEW's Write Delimited Spreadsheet (renamed in LabVIEW 2015 and given proper Error connectors), reads the just-created file using Read Delimited Spreadsheet, then reads the same file with Excel using the RGT, and finally does a LabVIEW comparison of the two data arrays to verify that they are, in fact, identical.  Note that if you actually examine the "all rows" and "data" outputs, they will appear to be different, but that's just due to the default formatting of the respective indicators.

 

Reading CSV in Excel.png

Bob Schor

0 Kudos
Message 7 of 7
(1,246 Views)