LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating a CVS file for recording results instead of simple txt format

dear friends,

I want to save my chart results to a csv format ,to be able to open it in Excel file later on.

any suggestion for doing this? should i simply conver the text data to csv data?

additionally I have another problem here:

my results look like this

3,10,213,20,5,30

but though they should look like this

3.10,213.20,5.30

so excel will assign each value to a coloumn (with each comma ,next colomn is assigned)


pls see my vi
regards


Message Edited by J.Dred on 12-16-2007 02:59 PM
Download All
0 Kudos
Message 1 of 7
(3,089 Views)

Apparently your computer has a country setting that defines the comma as decimal seperator. It is not a good idea to use csv in this case!

You can unckeck "use localized decimal point" in the front panel options.

You can also force a decimal point instead of comma as decimal separator by adding %.;  to your format string (%.;%.03f,%.03f,%.03f,%.06f in your case).

Why do you use a seperate loop for the random numbers???



Message Edited by altenbach on 12-16-2007 01:08 PM
0 Kudos
Message 2 of 7
(3,083 Views)
the point I use another loop is to simulate my actual code ( my inputs are arrays) , i know that I could use them in the second loop 😉

thank you very much , it works fine with (%.;) , now what do you advise me so I can open those results in Excel? (each value new row)

best regards

0 Kudos
Message 3 of 7
(3,075 Views)

or you have a better idea for recording the results in Excel ? (1.000.000 values)

 

0 Kudos
Message 4 of 7
(3,071 Views)
It's called CSV, for Comma Separated Variables.  CVS is a pharmacy.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 7
(3,044 Views)
Hi J.,

only the newest version of Excel will take 1 million rows (IMHO), older versions are limited to 65535 rows!
What about Diadem (from NI)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(3,039 Views)
Hi all,

The "Write to Spreadsheet File" VI (Programming » File I/O) is an easy way to write data to a .CSV. However, GerdW is correct with the row limitation of Excel. If you're just doing post processing, I'd save the data into .tdms or another binary file type and do my data processing in LabVIEW.


Message Edited by ryan_d on 12-17-2007 03:24 PM
Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
0 Kudos
Message 7 of 7
(3,021 Views)