10-07-2025 10:59 AM
I'm embarrassed to ask this but I'm terribly rusty with LabVIEW
If I'm outputting a 2D array into the file (Double precision numbers) Every for loop cycle
1 4
2 5
3 6
Using -write delimited spreadsheet Function
I get
1 4
2 5
3 6
1 4
2 5
3 6
After two cycles
What I want
1 4 1 4
2 5 2 5
3 6 3 6
How do I bring the second cycle back to the top of the file in alignment with the first data set?
Solved! Go to Solution.
10-07-2025 11:29 AM
If performance isn't a concern, you could read the existing contents of the file, do some transposes, and then append the new array.
10-07-2025 11:31 AM
You can only append rows, not columns. This is a consequence of the file layout.
On disk, the file looks like
1 4\n2 5\n3 6\n
after inserting columns, the file looks like
1 4 1 4\n2 5 2 5\n3 6 3 6
You need to build a larger 2D array in memory by concatenating each cycle’s 2D array horizontally (column-wise), then write the final array to the file once.
build array columnwise
The alternative is to change the file layout. Or rewrite the file each iteration.
10-07-2025 12:13 PM
That's the ticket...
Thank you to everyone