From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-10-2012 09:19 AM
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?
01-10-2012 10:03 AM
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.
01-10-2012 10:50 AM
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.
01-10-2012 10:53 AM - edited 01-10-2012 10:54 AM
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.
01-10-2012 10:54 AM
How do i create the csv file?
01-10-2012 10:56 AM
Write to Spreadsheet File.vi
01-10-2012 10:58 AM
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.
01-10-2012 01:49 PM - edited 01-10-2012 01:53 PM
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.