My data comes out from the device over serial like this: 21.032, %,0000,0000 and then I run it in the vi through the converter to plot the first number on the graph ( see attached). I want to save this first number over the entire time of the program running in an excel file but when i open the test.xlsx file it errors and says that the data is unreadable. Have I not properly wired the write to spreadsheet funciton?
Your code works fine for me.
I saved it to a test.txt file on my hard drive.
Then I right-click on the file, and select for Microsoft Excel to open it.
The numbers show up in the first column.
So I cannot write directly to excel and can only save it as a txt file and then open that in excel? Is there a way to get the timestamp of acquisition that way too? I was hoping for more of an X,Y spreadsheet.
If you write your text with its comma-separated values to a file using the Write to Spreadsheet File.vi and name the file with a *.csv, you should generally be able to double-click on it and have it open in Excel. This isn't a true Excel file, but many people seem happy with it.
What do I wire to the block then? I have the file path, but I have already created that text or excel file for it to work.
Just use a Build Array to add your timestamp. You can use whatever format you want for the timestamp.
Also, in order to read/write actual Excel files you need to use ActiveX. This has been asked MANY times before. You can program this yourself (an example ships with LabVIEW), or you can buy the Report Generation Toolkit.