LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

insert data into an excel spreadsheet

I'm scanning barcodes into an array in LabVIEW (they'll be in string format), and I'd like this string array to get written into an Excel workbook I've created. Right now all I can do is append my array values to the Excel workbook, but I want them to instead populate a certain range of blank cells in my workbook.  One time I got my data to be inserted in the correct place, but at the same time my program deleted all the other information from my Excel file.  Can you show me how to get my string array inserted in a specific column and row without affecting the rest of my workbook data?  I have Excel 2007, LabVIEW 8.2, and my program has to be able to be run on a PDA (my Excel sheet is saved as a *.csv file for this reason). 
 
Thank you,
zztopfan
0 Kudos
Message 1 of 5
(6,206 Views)
Have you checked-out the Excel examples that ship with LabVIEW? Do a search for "Excel" in the examples dialog box.

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 5
(6,166 Views)
I have checked out the examples that come with LabVIEW, including the ones that are specific to Excel in the Microsoft Office toolkit. I found two close matches, but I can't seem to strip them down to what I need. I don't need an entire formatted report generated like what the examples do; I simply need to insert 2 columns of data from my LabVIEW array into 2 blank columns in an existing spreadsheet. Suggestions on this are welcome:) Thanks again, zztopfan
0 Kudos
Message 3 of 5
(6,126 Views)

The URL below is also a great example of what you need to do.  In this example, the "Write to active cell" event case shows exactly how to write to just specific cells.  This is also much more stripped down then report generation VIs and should provide a good starting point.

http://zone.ni.com/devzone/cda/epd/p/id/4523

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 4 of 5
(6,090 Views)

Wow it feels great to be answering questions posted by NI. Have a look at the Excel board and you will find some examples of what you want to do.

For more information and some sample VI's and tool kits, you can go to the excel board




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 5
(6,079 Views)