LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save excel report as CSV file with ActiveX

Solved!
Go to solution

Hi,

 

I'm trying to save my excel test report as a CSV file using ActiveX and I'm having difficulty getting started.  I can't find an invoke node method that enables CSV file conversion. 

Can anyone shed light on this?  See attached screenshot.

 

Thanks

 

 

0 Kudos
Message 1 of 17
(4,879 Views)
0 Kudos
Message 2 of 17
(4,869 Views)

Hi Tim,

 

I didn't find any example that address how to save .xls to csv with ActiveX.  Do you have an example or how to go about doing it?

 

Thanks

0 Kudos
Message 3 of 17
(4,849 Views)

Can you create an xls file? If so How complicated is the xls file? Is it multi page? If it is only one page and has no graphs all you have to do is change the extention to csv.

Tim
GHSP
0 Kudos
Message 4 of 17
(4,838 Views)

Yes it is just one page. My report generation vi creates the .xls file. I don't think changing the extension will make it a csv file. If you try to open it in a text file you will end up with a bunch of unreadable characters. I'm trying to programmatically generate the report as a csv file and the recommended approach on several forums has been to use ActiveX.  Do you know how this can be done?

 

Thanks

0 Kudos
Message 5 of 17
(4,829 Views)

Are you trying to generate the file in MS Excel and then automatically save it as a csv file?

Tim
GHSP
0 Kudos
Message 6 of 17
(4,805 Views)
For a csv file, all that you need is the Write to Spreadsheet File. Your approach to use ActiveX to first create a native Excel file is convoluted and a Rube Goldberg. I'd like to see the forum posts that suggest this.
0 Kudos
Message 7 of 17
(4,803 Views)

Hi Dennis,

 

What I'm trying to do is very similar to the discussion on the thread below.  However, there were no additional details as to how they arrived at a solution. See link.

 

http://forums.ni.com/t5/LabVIEW/Saving-XLS-file-as-CSV-format-using-LabVIEW-amp-ActiveX/td-p/1056735

 

 

 

0 Kudos
Message 8 of 17
(4,750 Views)
Not at all the same thing. That thread discusses saving existing Excel files. From your description, you have data in your VI that you want to save as a csv file. Saving that data first as an Excel file just makes no sense.
0 Kudos
Message 9 of 17
(4,728 Views)

Post some code.  Show us you are making a little effort to solve this yourself.  In the past month, on this forum, there have been numerous discussions about .CSV and "Excel" files, including posts that basically lay out exactly how to do this (but not why you would want to do so -- if you've already gone to the trouble of creating a true Excel file, meaning a .xls or .xlsx file, which has many more inherent capabilities than a Comma-Separated Text File (which is just a text file, with no additional "bells and whistles"), why create the dumbed-down version?

 

Post your code, and I'm sure someone will point out how easy it is to use Write Spreadsheet File to create the .CSV version.

 

Bob Schor 

0 Kudos
Message 10 of 17
(4,708 Views)