From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

make new transposed data go to new column

Hello everyone,

So I am trying to take some data and add it to a spreadsheet.  I am transposing the data so it goes into a column instead of a row.  The problem I am having is, I want the next set of data to go to a new column instead of the next one below.  Here is what I have and the data it produces after two runs.  Please let me know how to fix this problem and thanks for taking the time to help.

 

 

Download All
0 Kudos
Message 1 of 4
(2,403 Views)

I am still not clear what you are wanting to do.

 

If you writing an 1D array, you won't be able to add data as new column.

0 Kudos
Message 2 of 4
(2,379 Views)

You can only add new data row by row which means appending data to the end of the file.  To add new columns, you need to continually rewrite your file since the new data would be interspersed throughout the old data.

0 Kudos
Message 3 of 4
(2,371 Views)

Write to Spreadsheet (which is the function you are using) is meant to write an entire 2D array of data to a binary stream file (read the Help for this function).  As such, you need to have your (single) 2D array formed, then write it "all at once".  In my (not-so-humble) opinion, calling this function "Write to Spreadsheet" is something of a misnomer, as many people (myself, included) think "Excel" when we hear "Spreadsheet" (sorry, Lotus).  Note that (again, from the Help file) the created file is not Excel-compatible.

 

Now, if you wanted to write an Excel spreadsheet, particularly if you had the Report Generation Toolkit, then it becomes a piece of cake to add rows, to add columns, to do both, and the resulting file is readable by Excel and by LabVIEW (using the Report Generation Toolkit functions, of course).

 

BS

Message 4 of 4
(2,331 Views)