From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open CSV files in Excel through labview

   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
(5,770 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
(5,763 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 2020
0 Kudos
Message 3 of 7
(5,762 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
(5,744 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
(5,730 Views)

Dear smercurio_fc,

 

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

0 Kudos
Message 6 of 7
(3,747 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
(3,735 Views)