Spreadsheet files organize 1D or 2D arrays of data in tabular form, or in rows and columns. Each cell of the table contains an element of the 1D or 2D array.
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, which 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 this spreadsheet file. The File I/O VIs and functions support text-based spreadsheet files with delimited string.
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, such as 12.0 or earlier. You must modify the application to use another file format before saving it for a previous version. |
To write data to an Excel file, you do not need to install Microsoft Excel. To view the data in the Excel file, you must use a spreadsheet viewer that can read the Office Open XML file format.
Each spreadsheet viewer has a maximum value for the number of rows and columns of data you can view. Errors might occur if the amount of data you write to an Excel file exceeds the maximum value. 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 National Instruments software applications, such as DIAdem 2010 or later. Refer to the documentation for DIAdem for information about importing Excel files.
Refer to the Write Excel File VI in the labview\examples\File IO\Spreadsheet\Excel folder for an example of using the Write To Measurement File Express VI to write data to an Excel file.
Open example� Find related examples