LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Export data to excel and table column headers

I noticed that with LV 2012 when I call the method "Export Data to Excel" for a table, the table headers (= column names) are not exported to excel.

Am I right? I think that the column names should be exported too...

As a matter of fact when you call the method "Export to simplified image" the column names are included

 

How can I export the table column names to excel?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 8
(7,307 Views)
You can export the column headers but not with the method you specified. The first method is doing exactly what is says: it is exporting the data to excel, and the column headers are not part of the data, they are properties of the indicator. Likewise, the second method does what its name says, it is exporting a picture of the indicator- even if there is no data in it.

There are other ways of getting you data into excel, or at least into a file that excel can read.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(7,292 Views)

Probably you're right considering the exact meaning of the words, but the data without the names is really difficult to understand if you have many columns.

I think that column names should be exported to excel together with the data.

Do you agree?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 8
(7,281 Views)
Yes you should keep them together. Check the examples that ship with LV for other techniques to write data to excel. You can write to excel data files using ActiveX or tab-delimited text files that excel can open.

Mike...

PS: part of the problem is that excel doesn't really distinguish column or row headers as distinct entities. In excel everything is just values in cells.

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 8
(7,279 Views)

In this document there is a full description of how to export data from LabVIEW to Excel.

Using a table, the method "Export data to excel" should export the "currently selected data", and data can be programmatically selected using ActiveCell property (as described here).

With ActiveCell I can select the column headers too (using negative numbers for row and/or column), and I do this.

And so I expect that when I select "Export data to Excel", the column headers should be exported too (because I selected them!).

I think that the actual behavior is a bug, rather that an expected behavior.

Don't you agree?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 5 of 8
(7,264 Views)
No. Just because LV gives you a way to shortcut the system and read headers using negative indices (which is itself not a great idea) it doesn't change the fact that headers are not part of the data. They are properties of the control or indicator that they appear in.

Technically, they are meta-data, or data that describes data. It's not just a matter of semantics. Its about maintaining proper distinctions. The problem is excel in that it muddles together things that shouldn't be mixed. The "spreadsheet" metaphor has outlived its usefulness - assuming it ever had a legitimate use for engineers.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 8
(7,254 Views)

Since I think this would be an useful possibility I wrote this idea

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 7 of 8
(7,192 Views)

One suggestion, you can make new table without headers just for export data purpose.

In this new table you can assemble data (insert in to array) from previous table.

Transfer data, transfer column (and/or row) headers in to table without headers and than export to Excel.

 

0 Kudos
Message 8 of 8
(5,295 Views)