Spreadsheet String to Array Fails to Recognize Carriage Return Delimiter in 1D Array

Updated Oct 31, 2025

Issue Details

In LabVIEW, I noticed that the Spreadsheet String to Array function doesn’t split text by a carriage return (\r) when I use a 1D string array, but it works correctly when I switch to a 2D array.

Solution

Since the line ending character is different depending on the platform, the specified string technically doesn't contain the EOL character for LabVIEW.

In order for the Spreadsheet String to Array function to recognize the end of line character in a Normal Display string with the EOL string constant, it is necessary to normalize the string.

Here are some options on what you can do:

  1. Use the Normalize End of Line function to convert the initial string into a string with recognizable EOL characters for LabVIEW:
    Image_2025-10-01_13-59-54.png
  2. Right click on the string constant and choose '\' Codes Display and replace the new lines with \r\n for the EOL character in ASCII code:
    Image_2025-10-01_14-04-41.png

  3. You can also concatenate the string constants with the EOL Constant using the Concatenate Strings function:
    Image_2025-10-01_14-08-37.png

Note: These images are LabVIEW snippets, which include LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.