Reading from Text Files
- Updated2026-05-01
- 1 minute(s) read
Read characters or strings from a text file in LabVIEW with the Read from Text File function.
To read characters or strings from a text file, complete the following steps.
- Add a string indicator to the front panel.
- Add the Read from Text File function to the block diagram.
-
Right-click the file input of the Read from Text
File function and select .
A path constant appears.
-
Enter an absolute path for the file you wish to read from into the constant.
Tip To avoid typing out the path, you can drag a file from the desktop and drop it into the constant.
- Wire the text output of the Read from Text File function to the string indicator.
- Run the VI.
Reading Text Examples
-
Refer to the Write to Text File and Read from Text File VI in the labview\examples\File IO\Text (ASCII) directory
- For an example that reads data from a text file and plots the data, refer to the Tab-Delimited Data project in the labview\examples\File IO\Spreadsheet\Tab-Delimited Data directory.