08-10-2021 01:44 AM
Hello,
currently i m Excel Files for my File I/O like in the attached VI.
To get a better access for people without Ecxel i wanna chance the Date Save system to CSV or txt.
How can i save date to a CSV or TXT file with also having columns. Up site on every column should stand the Datatype (like Voltage, Power...). My Data type are numeric Data, daynamic Data and String (i want to add a comment, so i can better order all my Measurements)
Regards
Felix
08-10-2021 01:52 AM - edited 08-10-2021 01:53 AM
Hi Felix,
@felixflex wrote:
How can i save date to a CSV or TXT file with also having columns. Up site on every column should stand the Datatype (like Voltage, Power...). My Data type are numeric Data, daynamic Data and String
To have columns in a CSV file you need to insert delimiter chars. Typically you use commas (as CSV = Comma Separated Values), but in Germany (by default) you should use a semicolon instead… (WriteDelimitedFile will do that for you.)
To save different datatypes you should convert them all to string and create a string array to use WriteDelimitedFile.
08-11-2021 04:43 AM
Hallo GerdW,
thanks for your help.
I tried to convert my diffent data into String, but i dont understand how i can handle the nummeric measurement Array Data.
Step by Step:
1. i created a String Array with the names of the diffrent Data types.
2. i use WriteDelimitedFile to write the Data names as headline
3. i convert the nummeric data via "Format to String" to a string
4. i convert the nummeric Array vie "Array to Spreadsheet string" to a sting
5. i build a String Array
6. i use WriteDelimitedFile again to write the data under the headlines
But my converted nummeric array data is than not placed in the column under the right headline.
08-11-2021 05:10 AM
Hey GerdW,
thanks for your help.
i dont understand how i get a nummeric Array into a String, so that the Data get saved in a Column under the headline.
A other problem i have is, how to safe more Measurements in one TXT.
The best for me would be that when i open the LAB View Programm, it creat with the first measurement a TXT File. In the first row i save the fixed headlines for the different data. Then, every time i do a measurement the new data get safed under the last measurement..