LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write string columns to Spreadsheet

Solved!
Go to solution

Hi,

I have problem.

 

I have a device which generates 3 data, eg. voltage, current, frequency.

When I run the program, all values are put under him, but I would like to were in the 3 columns.

For example:

Voltage      Current   Frequency

2                 1               5

4                  4              5

5                  3              6

 

The second problem is related when i run program continously. Values are not added to the column but overwritten.

 

save.jpg

 

What do I need to change the program to act as my premise?

 

Regards

0 Kudos
Message 1 of 7
(6,452 Views)
Solution
Accepted by piotrek1349

Don't use Save Spreadsheet String, but use the Write Delimited Spreadsheet function from the File I/O Palette.  Incidentally, I hope you realize that "Spreadsheet" in "LabVIEW-Speak" means "A text file where data are arranged in rows (with New Lines) and columns (with some to-be-specified separator character).  It does not mean "An Excel .xls or .xlsx file".

 

Bob Schor

Message 2 of 7
(6,446 Views)
Solution
Accepted by piotrek1349

Yer doin' it wrong...

 

First write your column headers to the file ONCE at the beginning.

 

Then write your numeric values in ROWS as a single demention array

========================
=== Engineer Ambiguously ===
========================
Message 3 of 7
(6,435 Views)

Ok,

 

First problem solved:) Thanks!

 

But,

How to add next values to the spreadsheet when i run program continously?

At this moment the values are overwritten.

save.jpg

0 Kudos
Message 4 of 7
(6,422 Views)
Solution
Accepted by piotrek1349

Use a loop

 

loop.PNG

========================
=== Engineer Ambiguously ===
========================
Message 5 of 7
(6,415 Views)

how are you writing your row of strings in the first array? 

I do not understand where you get that string format of many columns from? 

0 Kudos
Message 6 of 7
(4,568 Views)

Hi lodhi,

 


@lodhi33 wrote:

I do not understand where you get that string format of many columns from? 


When you write "columns" you should think of "array"!

Use a string array constant…

Best regards,
GerdW


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