0% found this document useful (0 votes)
841 views

How To Import Excel Into Labview

This document describes a LabVIEW VI that reads values from an Excel spreadsheet. It explains that the "Get Excel Values.vi" code opens the Excel application, a specific workbook, worksheet, reads the desired cells, and then closes everything. However, for continuous data reading, only the subVIs for opening the application, workbook, worksheet and getting cell values are needed. It provides details on the functionality and user input required for each of these necessary subVIs.

Uploaded by

Dan Johnson
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
841 views

How To Import Excel Into Labview

This document describes a LabVIEW VI that reads values from an Excel spreadsheet. It explains that the "Get Excel Values.vi" code opens the Excel application, a specific workbook, worksheet, reads the desired cells, and then closes everything. However, for continuous data reading, only the subVIs for opening the application, workbook, worksheet and getting cell values are needed. It provides details on the functionality and user input required for each of these necessary subVIs.

Uploaded by

Dan Johnson
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Figure 1- Read Excel Library

Get Excel Values.vi is a completed code that allows the user to open the Excel application, open a
specific Excel workbook, open a specific worksheet in that workbook, reads the desired cells of the
worksheet as specified by the user, and then follows a similar pattern for closing the opened
applications. For the purposes of this assignment, to continuously read the data in an Excel spreadsheet,
the closing of the application would be undesirable. Therefore, only the Open XL App, Open XL
Wkbook, Open XL WorkS, and Get Cell subvis are necessary for this project.

Figure 2- Get Excel Values.vi

1) Open XL App simply opens the Excel application and requires no user input.
2) Open XL Wkbook allows the user to browse ones files in order to supply the vi with the
specific file path of the chosen Excel file. Prior to use, the desired Excel file must be saved as a
1997-2003 .xls file.

Figure 3- Open XL Wkbook

3) In the Open XL WorkS subvi, the user specifies the sheet number to be opened (1, 2, 3).
4) The Get Cell subvi, which is most easily used by copying it from the example program, allows
the user to specify the starting and ending rows and columns for the desired Excel data.
Note: If any data is not a double, this vi will throw an error.

Figure 4-Get Cell

The following is an example front-panel composed of the necessary blocks.

Figure 5- Example Front Panel

You might also like