01-18-2011 07:19 PM
I am using LabVIEW 2009 on a PC running Windows XP. I am trying to develop a section of a program that will take a 2-dimensional array of numeric data, convert the numeric data to strings, and for each row insert commas between each string that represents a numeric data, and then write this as a comma-separated-variable data format to a file. Each column in the original array will end up as a separate line in the target text file.
Please see the attached picture of the part of my LabVIEW program for doing the above operation (the final write-to-file operations are not shown).
The problem that I am having is that I would like to delete the final comma at the end of the string for each line, just before the CR-LF. I am using the \b code for backspace in the string concatenate function, however this does not appear to be working. Here is an example output that I get:
2.500000E+0,2.500000E+0,2.500000E+0,2.500000E+0,2.500000E+0,2.500000E+0,
I stuffed the entire array with the value of 2.5 for each element. Notice that the final comma was not removed, but a strange character (the box) was added at the end. The CR-LF did work. If I remove the \b from this program, the box character goes away.
Any suggestions? Thanks.
01-18-2011 07:45 PM
How about using "array to spreadsheet string" with comma as delimiter? One step!
(Your \b is just another character added to the string, it does not perform any editing operation)
01-18-2011 08:39 PM