Reading Microsoft Excel Numeric Data Into LabVIEW

Updated Nov 17, 2020



  • LabVIEW

Operating System

  • Windows

How can I read numeric data from my Microsoft Excel spreadsheet into LabVIEW?

A straight forward way to get numeric data from Microsoft Excel is to use the VIs that come with the LabVIEW Report Generation Toolkit for Microsoft Office .

If you dont have access to these VIs, there are two VIs within LabVIEW that help with reading data from a Microsoft Excel spreadsheet in LabVIEW:
  • Read Delimited Spreadsheet VI
(which replaced the Read From Spreadsheet File VI in LabVIEW 2015 and onward)

If you created your Excel spreadsheet by manually entering the data in (not using LabVIEW and Write Delimited Spreadsheet VI), Read Delimited Spreadsheet VI will not properly interpret your .xls file and will return zeros into your array. In order to get the data into an array in LabVIEW you will have to save the Excel file as a Tab delimited text file. Inputting the new .txt file into the file path node of Read Delimited Spreadsheet VI will populate your array with the proper data.
  • Read From Measurement File Express VI
You may read numeric data in an Excel spreadsheet into LabVIEW using the Read From Measurement File Express VI through a the following steps:​
  1. Navigate to the location where you have your Excel document saved as a Tab delimited text file, right-click on your filename.txt document, select Rename, and rename your file with a .lvm extension so that your file now appears as filename.lvm.
  2. Read your numeric spreadsheet data into LabVIEW by specifying filename.lvm as the File Name in the Read From Measurement File Express VI configuration window.

To save your spreadsheet to a tab delimited text file, please follow these steps:
  1. Open your Excel spreadsheet containing simple numeric information.
  2. Save your Excel spreadsheet as a Tab delimited text file.
  1. Click OK.  Note that you are only saving numeric data from the active worksheet.
  2. Click Yes.
  3. Close your Microsoft Excel document. 

Additional Information

Read From Spreadsheet File VI (Read Delimited Spreadsheet VI):
If you just need the first column of data, you can wire a True constant to the Transpose? node, and the First Row output will give you an array with the values of your first column of data.

You can also use the LabVIEW Report Generation Toolkit for Microsoft Office to work with Microsoft Word files.