02-26-2016 05:01 PM
Solved! Go to Solution.
02-26-2016 05:07 PM - edited 02-26-2016 05:15 PM
Yes, you can do most of that easily. What is giving you problems? Can you show us you problem code?
The only expection is that you cannot easily add new columns to an existing delimited file, because elements of a new column are not adjacent (in memory or on disk), meaning that the entire file needs to be read, all data combined into a new copy, then written back to disk.
In contrast, appending rows is easy and the existing file data does not need to be touched.
02-26-2016 05:12 PM
You can not append columns to the spreadsheet without rewriting the whole file:
Read file -> transpose array -> build array (add rows) -> transpose -> Write spreadsheet.
On disk spreadsheets (and other files) are one dimensional:
1 2 3 (new line) 4 5 6 (new line) 7 8 9 (end of file)
To insert columns it needs to move multiple parts of file. It is not a basic operation. It is possible to do it (not to load the whole file into memory), but it is much more complicated than above sequence.
02-26-2016 05:45 PM
I will leave the code and the output in the description.
02-26-2016 05:54 PM
If you are going to use tab (\t) as the delimiter, then make the file a txt. Then Excel will open it the way you want.
If you want to keep the csv extension, then use comma (,) as the delimiter.
02-26-2016 05:56 PM
@Nando88 wrote:I will leave the code and the output in the description.
You are only showing two truncated pictures, one containing LabVIEW code with many overlapping items and wires coming from the outside. I don't see anything configured for appending to an existing file.
Attach the actual VI if you want our help. Thanks.
... and why are you calling the file *.csv if you use tab as delimiter? What's the display format of your string constants?