G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Array to Spreadsheet String and Spreadsheet String to Array

I have a need to use the same functionality as the LabView Array to Spreadsheet String and Spreadsheet String to Array VIs in order to process comma-separate strings in tags.  But, I don't see these in the available GWeb VIs.  Are these available somewhere else?  If not, I'll have to reproduce them (any suggestions on the best way would be appreciated).  Thank you.

0 Kudos
Message 1 of 3
(854 Views)

The easiest route is perhaps a for loop over all of the string elements and on every iteration past 0 you also prepend the separator.

 

If you want to be a bit more optimal you first iterate over the elements to sum up the total resulting string length (don't forget to include the (number of elements minus 1) * size of separator), allocate a string of that length, and do replace subset across the new string for each element.

~ The wizard formerly known as DerrickB ~
Gradatim Ferociter
0 Kudos
Message 2 of 3
(833 Views)

Thank you for your quick response.  And the reverse to take a tag value that is a comma separate string; parse each substring with string subset, or search/split string and create a 1D array of substrings?

0 Kudos
Message 3 of 3
(825 Views)