12-01-2011 12:22 PM
I am using array to spreadsheet. I notice that there is always a eol at the end. Is there a easy way to get rid of the eol? Thanks!
Solved! Go to Solution.
12-01-2011 12:37 PM
Someone can probably come up with something more elegant, but here's the dumb and stupid way...
12-01-2011 12:52 PM
Correction for the above: EOL is different based on the OS. Thus, you'd need to account for the actual length of the EOL "character".
An alternative is to convert the array to a string array and then use the Join Strings VI (not in the palette). You can find an example here: http://forums.ni.com/t5/LabVIEW/Darin-s-Weakly-Nugget-1-10-11/m-p/1409328
12-01-2011 01:32 PM
Put a "Trim Whitespace" function after Array to Spreadsheet string, and set it to trim whitespace from the end.
Of course, this will cause problems if your last spreadsheet cell may actually contain whitespace characters, but otherwise it's fine.
12-01-2011 01:36 PM
Or this?
I believe that using the "EOL" constant from LabVIEW's string palette will take the length of the EOL into account regardless of OS? I might be wrong, though.
12-02-2011 03:04 PM
smercurio_fc, I knew I saw that somewhere.