02-05-2015 09:41 AM
I would like to know how can i write the 1d cluster in . csv?
Solved! Go to Solution.
02-05-2015 09:42 AM
02-05-2015 09:47 AM
it contains 2 double and 1 array
02-05-2015 09:52 AM
02-05-2015 09:55 AM
I would use a FOR loop to create an array of strings, an element for each line that goes in your file. Format Into String would be useful here. Then use the Write Text File to actually write to the file. Open/create your file before your loop and close it after the loop.
02-05-2015 10:05 AM
i' ve tried this but my vi write 2 datas only
See the file
Tks 🙂
02-05-2015 10:15 AM
You need to wire a True to the Append to File input of Write to Spreadsheet File.vi. As you have it configured, it overwrites the old data on every iteration of the while loop.
Turn on the context help window to get more information.
Lynn
02-05-2015 11:25 AM
02-05-2015 11:40 AM
i did the conversion because i wanna add another sring with the names of the colums
02-05-2015 12:19 PM - edited 02-05-2015 12:19 PM
Ok, stop using the Write To Spreadsheet File VIs. Use the actual File IO API. This way you can create the file, write the header data, write data continuously in the loop, and then close the file after the loop. It will make things a lot simpler and a lot more efficient.
There is also no need to wire up the N on the FOR loop since you have an autoindexing tunnel that will tell the loop how many times to iterate.