From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update data from an existing excel file using labview?

Solved!
Go to solution

Hi all, 

 

I know there are a lot of topics regarding of how to create or update excel data using LabVIEW but I couldn't any solution to my problem.

 

My problem is, let say I already create an excel file using microsoft office itself and i did a lot of font format, formula, picture, etc. So, is it possible to update the excel data using LabVIEW without change any of the format?

 

Currently I'm doing Auto checking system. After checking certain part, if result is OK, i want the word "OK" updated to certain row/column of the existing excel file and all the format, formula, picture remain the same. 

 

I dont have any example yet because i tried to use Write Text File from File I/O but the function are limited to what i wanted. I wonder Report Generation Toolkit can work or not? 

 

Is there any example i can refer? 

 

For your information I'm using LabVIEW 2010 version.

 

Thank you

0 Kudos
Message 1 of 4
(3,739 Views)

Hi

You need to use Report Generation>Excel Specific functions to open your existing excel file, you can navigate between excel sheets, select specific cell coordinates and write to that cell whatever you want. All you need is within the Excel Specific tools. You can even create a macro and run that macro as well to update your file.

Senior Software Developer
Message 2 of 4
(3,726 Views)

Yes, the Report Generation Toolkit will let you interact with Excel, itself (which needs to be present, as it "does most of the work").  If you want to open an existing Excel Workbook, you need to specify its path in the New Report function, naming it as a "Template" (never mind the misnomer).  You can "modify" it, but you also need to Save Report to File before you Dispose Report (which closes Excel).

 

Functions in the RGT allow you to go to a specific WorkSheet.  Other functions allow you to read and/or write specific Cells, Rows, Columns, etc.  I recommend using the "Excel Easy Table" function instead of the higher level "Append Table to Report" function.

 

Bob Schor

Message 3 of 4
(3,710 Views)
Solution
Accepted by GavinT

Thanks for the solution.

 

Instead of using Report Generation Toolkit, I'm using ActiveX function to open/read/wrtie/close excel file. 😄

0 Kudos
Message 4 of 4
(3,677 Views)