Error When Using Empty String as One of the Delimiters for Spreadsheet String

Updated Nov 1, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am using the Spreadsheet String to Array Function and have a string array wired to the delimiter (Tab) input terminal that includes an empty string as one of the elements. When I run the VI, it shows the following error message and cannot properly convert the spreadsheet string to an array. 

LabVIEW:
Invalid input parameter. For example, if the input is a path, "?" or "@" or other characters not allowed by the OS may be included in the bus.

Top-level VI "xxx" stopped at "T2A" converting spreadsheet string to array (block diagram: xxx.vi).

Solution

Unfortunately, for the Spreadsheet String to Array Function or the Array to Spreadsheet String Function , LabVIEW cannot interpret empty strings properly when included in a string array. The reason for this behavior is rooted in how the function processes the delimiter array. When LabVIEW encounters an empty string in the array, it might interpret it as if there is no delimiter at that position, which can lead to unexpected behavior because it might interpret the empty string as a placeholder for missing or undefined data rather than a literal delimiter.

Additional Information

To avoid such errors, it's recommended to ensure that the delimiter array used in the Spreadsheet to String function does not contain empty strings. If you need to handle empty elements in your data, you might consider using a different delimiter that is unlikely to be present in your data, or you could preprocess your data to replace empty strings with a specific placeholder string before using the function.