ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
02-26-2015 11:59 AM - edited 02-26-2015 12:11 PM
I have a VI which writes to a spreadsheet. I generate a 1D array the first time the you run the VI which is placed into a spreadsheet. If I do it directly I get the entire array only into 1 cell
If I tell it to transpose when writing to spreadsheet I get one value for each row in the first column.
The second time I run the code the the VI reads the original array in excel and then appends the new data to the array and overwrites the file. I would like to do one of two things.
I would either like the data to write vertically with each new set being added to the next column or I want the new data write horizontally across the columns and append new data to new rows. I would prefer to just have the data write to individual cells within the same row fixing the issue in the top picture. The main issue is that I want one value per cell in excel. I have attached the VI and the data sheet to this inquiry. The way it works is you put in the name of the file you would like to save. Then you run it once. You can then update the desired crosssection run it again and it should save to the file again. Any ideas would be appreciated.
Solved! Go to Solution.
02-26-2015 12:03 PM
There's not attachment.
02-26-2015 12:03 PM
My browser won't let me attach the files. Will do so shortly on differnent computer.
02-26-2015 12:05 PM
02-26-2015 12:12 PM
As I said in a previous post my browser didn't let me upload the files. I have now attached them.
02-26-2015 12:16 PM
02-26-2015 12:20 PM
They are on the original post but I have added them again.
02-26-2015 05:05 PM
A minor quibble -- do not call this "Excel", as you are not using Excel. LabVIEW's Read/Write Spreadsheet work with .csv files, not Excel's .xls/.xlsx formats.
02-26-2015 07:57 PM
If you want to write data into each cell separately, you need to define delimiter (comma).
Check this snippet. You will get an idea. BTW write to spread sheet vi also doing same (Internally).
Below snippet writes new data at end (i.e. Row by row). If you want to write data column wise, you need to read all your data from old file & append new data to that & write it again. But it is not a good idea. Simply reading old data (without doing anything) is not a good way.
If you really want to do that, use Excel (Report generation toolkit) & define your cell value.
02-27-2015 11:15 AM
Thanks I got it doing what I want now.