LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write table to spreadsheet with headers

Hello all,
I am having problems writing a table with column and row headers to a spreasheet. I can only manage to write the data but the headers are not writing.
I managed to do this already but I lost the VI and havent been able to do it since.
I think you can do it by using multiple "write to spreadsheet" VI's but im sure there is a quicker way to write the entire table.
I have attached the test Vi im using.

thanks in advance.
0 Kudos
Message 1 of 3
(2,834 Views)
Attached is a file that shows you a couple of options for writting data to file. I included an option to write the data to a table, but I didn't complete the task of taking the data (incl. headers) and writing to file. The key thing to remeber with tables is that the headers are not part of the dataset so you will have to use the property node of a table to extract this information (and write it as well). To creat the property node you simply right click on the table indicator from teh block diagram and select 'Create >> Property Node'. If you want to then add this data to the dataset you have to do it in the same fashion that I did in the write to file with headers data flow. Just don't forget that you need to add aempty element for the first row and f
irst column. Otherwise either the columns or rows will have an offset in the header. Hopefully the program makes more sense.

-Christer
0 Kudos
Message 2 of 3
(2,834 Views)
Thanks for your quick reply Christer.

Just to give you some further information, Im using a subvi to package the data and write it to a spreadsheet file. The data is formatted to a Table then converted to a spreadsheet string as you have done.
The reason I need to write the whole table is that Im running different tests and each of these tests outputs different table and data configurations. When the data is passed to the packaging subvi, it creates an appropriate folder and file name.
I would like to use the same data packaging vi that will take 'any' sort of table and write it to file.

Like i mentioned before, I did manage to do this, but just cant replicate it 😞
0 Kudos
Message 3 of 3
(2,834 Views)