LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn rows into columns with Write Delimited Spreadsheet.vi

Solved!
Go to solution

I'm trying to create a .csv-file which in it's first row has the names of the measured data. Then the numeric mesurement data should be inserted row-wise each time a button is pressed. However, I can't find a way to make the names go into the first row. If I use "transpose = TRUE" in the Write Delimited Spreadsheet.vi, I'm getting the result of the last picture

5.PNG

2.PNG

3.PNG4.PNG

6.PNG

0 Kudos
Message 1 of 7
(1,286 Views)

Hi faul,

 


@UL-00 wrote:

If I use "transpose = TRUE" in the Write Delimited Spreadsheet.vi, I'm getting the result of the last picture


The problem with images is: we cannot run/edit/debug them with LabVIEW!

Are you sure you wired the "Transpose?" input?

 

A 1D array usually appears as row in the CSV file:

GerdW_0-1676895851234.png

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,281 Views)

Hello Faul,

 

in your middle Sequence-Frame you wire the "Write Delimited Spreadsheet" VI with a true at Transpose. This is is the raisin you get every name in a new row (you get a column). In the third frame you don't wire the Transpose- Input, so the values appear in a row. If you would wire a true to Transpose, the values would appear under the present names in the same column, so you would have only one column with all names and values in one column.

 

The table you described would be created just without wirering the transpose input.

If that's not what you expect, please provide an example table of your desired format. And as Gerd stated already, a picture is not debuggable.

Greets, Dave
0 Kudos
Message 3 of 7
(1,273 Views)

Another point: why do you have 8 signal names and only 6 signal values?

Greets, Dave
0 Kudos
Message 4 of 7
(1,269 Views)
Solution
Accepted by topic author UL-00

check if your header strings contain newlines and/or delimiters

also check the text representation of your csv file and display whitespace characters

also, you should use the same delimiter for header and data, the error will manifest slightly differently

0 Kudos
Message 5 of 7
(1,254 Views)

I solved the problem. Excuse me just giving screenshots, but the whole program is so complex that it was really hard to exract a working code snippet.

 

The problem was that my 1D array of names came in a weird formatting, seperating each string with "ENTER+TAB":

 1.PNG

The following little subVI solved my problem...2.PNG

giving me comma seperated entries.

3.PNG

0 Kudos
Message 6 of 7
(1,236 Views)

@daveTW: Nevermind, I just forgot some values 😉

0 Kudos
Message 7 of 7
(1,147 Views)