LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write and format to excel

Solved!
Go to solution

I am currently using labview 2010 and i am trying to write my data with time stamp to excel.  I have my time stamp formated as a string and my data is in either an array or a dynamic data type. The write to measurement vi does not work with my data for some reason and i havent been able to figure that out, but any suggestions on how to do this, as well as format column headers would be much appreciated.

 

Thank you



-Matt
0 Kudos
Message 1 of 15
(2,790 Views)

Post some code with some example data.

 

We can't guess why your "VI does not work for some reason" if you don't show us anything.

0 Kudos
Message 2 of 15
(2,775 Views)

Hello again Ravensfan,

 

So this is actually working perfectly right now.  I can create my column headers prior to the loop and then i append my data to the file inside the loop.  The problem now is trying to add the time stamp.  I would prefer to add the timestamp to the first column of my file, but i dont know how to properly format it so that i can append it to the file.  Youll see my time stamp at the upper left corner of the image.



-Matt
0 Kudos
Message 3 of 15
(2,769 Views)

Whew.  That is heavy on express VI's.

 

If you have problems with formatting, I would convert the timestamps and numbers to strings within the loop and write it to the file as strings.

0 Kudos
Message 4 of 15
(2,766 Views)

Sorry about all the express vi's i will remove them later, im just using them to monitor some of the measurements at the time.  All i will be sending to excel is the humidity reading after being processed by the formula and then 15 thermocouple channels and the time stamp. The data is in dynamic form and the time stmap is in a string.  I  can easily send the data to excel, but i cant format the time stamp to be sent at the same time.



-Matt
0 Kudos
Message 5 of 15
(2,729 Views)
Solution
Accepted by topic author Wolleee

Format into String.  It has format codes that will enable you to convert a timestamp to a string in whatever format you want.

0 Kudos
Message 6 of 15
(2,725 Views)

In the png you can see the formated time stamp string, but when i attempt to wire it to the write to spreadsheet block, it wont allow the string to  be wired. Is there a speacial format that is required or do i have to convert this strying into another format..?



-Matt
0 Kudos
Message 7 of 15
(2,716 Views)

As I said earlier, convert the other numbers to strings also, then write that all to the file.

0 Kudos
Message 8 of 15
(2,710 Views)

Ok.  I will attempt to do this.  Thank you



-Matt
0 Kudos
Message 9 of 15
(2,703 Views)

Ravensfan thank you for the advice, I converted the data to string using the number to fractional string block and then i used the build array block and combined the strings.  works perfectly.

 

Note, that i tried to use concentrate strings, and this didnt work due to the write to spreadsheet only accepting array data forms.

 

Thanks once again.



-Matt
0 Kudos
Message 10 of 15
(2,654 Views)