LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to OPEN Excel file

How can I write to a generic Excel worksheet that is already open?
 
I want to be able to fill some cells in the Excel worksheet and do a save-as.
 
All the examples I have seen involve using ActiveX to start up Excel, open the file, select a worksheet, write to worksheet, save file, close file, and exit Excel.
 
A search showed a link to a message in the old forum.
Message 1 of 7
(3,911 Views)

Are you trying to write to any open sheet or a specific one?  The specific one may be harder because you would need to get a reference to it.

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 7
(3,896 Views)
Right now the test process is semi-automated at best. There is an Excel worksheet that is open and test data
gathered are entered manually by hand then Save-As is done for each serial number. The manual entry
is error-prone, so I am hoping to eliminate that problem.
 
After some trial-and-error using the examples on ni.com as starting point, I am able to write to the open worksheet. 🙂
Message 3 of 7
(3,890 Views)
Good Luck
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 7
(3,888 Views)
To nyc, you said you had it work. Would you please show me how to write data into specific cell of the excel sheet?
0 Kudos
Message 5 of 7
(3,559 Views)
KPRO,

There are several LabVIEW examples on this NI website for writing to Excel.

This is just one of them:  http://zone.ni.com/devzone/cda/epd/p/id/4523


Message Edited by nyc on 03-15-2008 10:06 AM
0 Kudos
Message 6 of 7
(3,539 Views)

Hi nyc,

Thank you very much for your help. Now I can read & write from/to excel via LV

0 Kudos
Message 7 of 7
(3,511 Views)