LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data in an existing Excel document

Hi,

Anyone know if it is possible to save datas (from LabView 7) in an existing Excel document (Office XP), which already has data in it?
I would like to save some measurements values in some precises cells, in my preformatted document (example : save the current in the H13 cell).

Or another solution : saving my datas in a new worksheet of the existing document, and then use Excel formula to link the data to the corresponding cell (example : on worksheet 1 : cell H13=worksheet2!G13)

It will be better if someone has an example to give me...

Thanks a lot
0 Kudos
Message 1 of 3
(2,798 Views)
In labview, goto menu Help >> Find Examples . When the "NI Example Finder" shows up, search for "excel" under the search tab. You will see several example vis show up.

-Joe
0 Kudos
Message 2 of 3
(2,783 Views)
Look at the example called Write Table to XL. I has all of the basic steps required to write a block of data to a new workbook. With minor modification, you can open an existing workbook.

The best way to write to precise cells is by using Named Ranges. In your worksheet, select the cell that you want to write the data to. On the menu, select Insert->Names->Define. Give a name to the cell such as TestCurrent (no spaces allowed). Then in LabVIEW modify the vi Set Cell Value and bypass the Row Col To Range Format vi. You can specify the value for Cell1 using the defined name and write one value to any location on the page.

The main benefit to named ranges, is that they are adjusted automatically when rows or column are inserted or deleted on the page.
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 3 of 3
(2,763 Views)