LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array to spreadsheet eol

Solved!
Go to solution

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!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 6
(3,751 Views)

Someone can probably come up with something more elegant, but here's the dumb and stupid way...

 

rid of eol.png

Message 2 of 6
(3,747 Views)
Solution
Accepted by topic author jyang72211

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

Message 3 of 6
(3,741 Views)

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.

Message 4 of 6
(3,735 Views)

Or this?

rid of eol.png

 

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.

Message 5 of 6
(3,733 Views)

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 6 of 6
(3,716 Views)