Write Data to Excel File Without Report Generation Toolkit

Updated Aug 18, 2023

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Other

  • Microsoft® Excel

Issue Details

I would like to export a waveform to an Excel spreadsheet. I want to be able to view the data in both Excel and LabVIEW, but I do not have the Report Generation Toolkit. What is the best way of doing this?

Solution

There are multiple methods to export waveforms from LabVIEW to Excel without using the Report Generation toolkit. Some innate LabVIEW VI options are: Alternatively, you can use TDMS files for Excel files for more efficient data streaming. Read through Writing TDM and TDMS Files in LabVIEW for instructions.

Note: For versions before LabVIEW 2015, the Export Waveforms to Spreadsheet File, Export Data to Excel Method, and Write to Spreadsheet File VI can be used.
 
 

Additional Information

  • The Write Delimited Spreadsheet VI (known as the Write to Spreadsheet file in versions before LabVIEW 2015)  will only write the tab-delimited data. The data needs to be sent as a 2D array, so any waveform data types acquired will need to be parsed to obtain X and Y scale values. The array data will be readable in Excel, and can also be read back by LabVIEW. This data can be read back into LabVIEW using Read Delimited Spreadsheet VI.
  • For versions later than LabVIEW 2010, you can use the 'Export Data to Excel' method. It is possible to export waveform data from a chart or graph by invoking this method using an invoke node. The invoke node can be created using the right-clicking on the waveform graph icon in the block diagram >> Create >> Invoke Node >> Export Data to Excel.
  • The Write Waveforms to File VI is used with Waveform data types. The data acquired in the waveform format does not need to be converted into array type. This VI will write the data with the header in Excel. However, the data in Excel will have strange characters and will not be fully readable. This is because the data was sent as the waveform type, and not tab-delimited type. You can read this data with LabVIEW by using the Read Waveform from File VI. The resulting waveform data is in the same format as is the one sent to Excel. No conversion is needed.
  • The Export Waveforms to Spreadsheet File VI is a special case of Write Waveform to File. You can use this VI to create a text file that is readable by most spreadsheet applications. The data is sent in the waveform format, and the file created will have a header. However, when you try to read this data back in LabVIEW with the Read Waveform from File VI, you will receive Error 71: File datalog type conflict. You should not use this VI to write the data in Excel if your goal is to analyze that data back in LabVIEW later as there is currently no VI for importing these waveform spreadsheet files back to LabVIEW.