LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

View and Edit Excel in LabVIEW

Hi all,

 

Is it possible to

1. View 

2. Edit

3. and save an entire Excel workbook in LabVIEW?

I have an excel which user needs to modify every now and then save it again. Once it is saved it further gets read and the data gets processed in LabVIEW. This consumes much of a time.

Instead of this I want to view and open it in LabVIEW itself wherein user can edit it and save that back. So that user does not need to open a separate excel application.

Any suggestions would be highly appreciated

0 Kudos
Message 1 of 3
(1,289 Views)

Hi SuLAB,

 


@SuLAB wrote:

Is it possible to

1. View 

2. Edit

3. and save an entire Excel workbook in LabVIEW?

… Once it is saved it further gets read and the data gets processed in LabVIEW.


So you already know how to do step 1 & 2 when "the data gets processed in LabVIEW".

All you need now is to save the data to Excel: either use the RGT or plain ActiveX nodes to send data to Excel and to save the workbook…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,257 Views)

Hello, SuLAB.

 

     To expand a little on GerdW's remarks (with which I agree), here are some additional comments.

  • Many questions on the Forum regarding "Excel" confuse "Delimited Spreadsheets", also known as ".csv" files that Microsoft Windows shows with an icon that resembles the icon for its proprietary .xlsx/.xls format.  Such Delimited Spreadsheet files are ordinary text files, with commas (or <tab> or another character of your choice) separating "columns" and <cr><lf> separating rows.  Excel is not needed for these file types.
  • True Excel files (.xlsx, for example) can be read and written with LabVIEW provided you have the Report Generation Toolkit (an add-on to LabVIEW Base that may require an additional license fee), or you use a third-party toolkit that uses ActiveX calls to manipulate the file.
  • The Report Generation Toolkit (or RGT) actually works with Excel (which it opens and calls to do much of the "Excel-like" work for you).  It contains functions that allow you to work with multiple WorkSheets inside the WorkBook and to save the changes back to Excel.  There are numerous discussions and examples of using the RGT, including in this Forum.
  • I've used the RGT for years, and recommend it.  I find calling LabVIEW functions to manipulate Excel data much easier to grasp, and to organize into LabVIEW VIs that "do what I want them to do" than the ActiveX method of using Property and Invoke Nodes.

Bob Schor

0 Kudos
Message 3 of 3
(1,247 Views)