Spreadsheet files store 1D or 2D array data in rows and columns. LabVIEW natively supports text-based spreadsheet files with delimited strings and supports binary spreadsheet files through DataPlugins.

Each cell of the table contains an element of the 1D or 2D array.

Text-Based Spreadsheet Files

Text-based spreadsheet files are a subset of text files. To write data to a spreadsheet file, you must format the data as a spreadsheet string. A spreadsheet string is a string that includes delimiters, such as tabs or commas.

After you read data from a spreadsheet file, the data is a set of spreadsheet strings. You need to format the strings as the data type you expect from the spreadsheet file. The File I/O VIs and functions support text-based spreadsheet files with delimited string.

Binary-Based Spreadsheet Files

Binary-based spreadsheet files contain binary data rather than text. Many binary spreadsheet file formats exist. To read binary data from a third-party spreadsheet file in LabVIEW, use DataPlugins.

To save dynamic data you acquire to a Microsoft Excel file .xlsx, you can use the Write To Measurement File Express VI. This Express VI uses the Office Open XML file format, which conforms to the international standard ISO/IEC 29500:2008, to create the Excel file. Refer to the International Organization for Standardization website at www.iso.org for information about the ISO/IEC 29500:2008 standard.

Note If your application uses the Excel file format, you cannot save the application for a previous version of LabVIEW. Before saving the application for a previous version, you must modify the application to use another file format.

To write data to an Excel file, you do not need to install Microsoft Excel. To view the data in an Excel file, use a viewer that can read Office Open XML files.

Each spreadsheet viewer has a maximum number of rows and columns of data that you can view. If you attempt to write more data than the supported maximum, errors might occur. Refer to the documentation for each spreadsheet viewer for information about the maximum value you can view in an Excel file.

After you write data to an Excel file, you can import the Excel file to other NI software applications, such as DIAdem 2010 or later. Refer to the documentation for DIAdem for information about importing Excel files.

Writing to an Excel Spreadsheet Example

For an example of using the Write To Measurement File Express VI to write data to an Excel file, refer to the Write Excel File VI in the labview\examples\File IO\Spreadsheet\Excel folder.