Creating Spreadsheet Files
- Updated2026-05-01
- 2 minute(s) read
Create text-based spreadsheet files in LabVIEW by formatting data into a delimited spreadsheet string. LabVIEW includes multiple approaches to create spreadsheets based on the format you need and the needs of your application.
Text-based spreadsheet files are a subset of text files. LabVIEW includes various functions and VIs to format string data as a spreadsheet string. A spreadsheet string is a string that includes delimiters, such as tabs.
You can create multiple types of spreadsheet files with LabVIEW.
| Option | Description |
|---|---|
| Write data to a spreadsheet of any dimension: multiple data types, streaming capability | Use the Format Into File function or the Format Into
String function. Tip Refnums to files
perform faster than paths to files. Because Format Into File can
accept a file refnum, this option can provide the highest performance for continual
writes to the spreadsheet file. You can write headers to the spreadsheet file with the Write to Text File function. |
| Write data of any dimension and a single data type to a spreadsheet once | Use the Array to Spreadsheet String function. You can write headers to the spreadsheet file with the Write to Text File function. |
| Write 1D or 2D data of a single data type to a spreadsheet once | Use the Write Delimited Spreadsheet VI. |
| Create an Excel spreadsheet (.xlsx) | Use the Write to Measurement File Express VI. |
| Write numbers and text to a spreadsheet application or word processing application |
Note Word processing applications format text with different
fonts, colors, styles, and sizes. The File I/O VIs cannot
process these formatting elements. As a result, reading text from a word processing
application might result in errors.
|
Creating a Spreadsheet for Multiple Data Types with Format Into File
The following VI writes different data types to a text file.
- Write to Text File function: Writes a header that contains string data and delimiters.
- Format Into File function: Formats timestamp data, numeric data, and delimiters into a spreadsheet string. Writes the spreadsheet string to the file.
Related Information
- Text Files
Text files store data as text strings for easy sharing across applications and computers. When using text I/O, Consider tradeoffs compared to binary files, such as file size, I/O speed, random access limits, and numeric precision.
- Grouping Data with Strings
- Spreadsheet Files
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.
- Grouping Data with Arrays and Clusters
- Arrays
- Clusters
A cluster groups data elements of mixed types. Bundling several data elements into clusters eliminates wire clutter on the block diagram and reduces the number of connector pane terminals that subVIs need.
- Saving Memory using Disk Streaming
Disk streaming means performing multiple read or write operations within a loop on an open file. Disk streaming saves memory by reducing the number of times a function interacts with the operating system to open and close a file.
- Formatting Strings
- Format Specifier Syntax
Understand LabVIEW format specifier syntax for format strings that format output or scan input.