LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to spreadsheet append to file

Solved!
Go to solution

Hi,

I have two 2D data from measurement like those:

the first:

-1.000000E+0    5.102000E-10
-9.000000E-1    4.069000E-10
-8.000000E-1    3.149000E-10
-7.000000E-1    2.329000E-10

the second:

1.505356E-2    8.315681E+10
1.556519E-2    8.639427E+10
1.604228E-2    8.955526E+10

 

I used "write to spreadsheet" function to write to the file, for the second one, i set the "append to file" to "True". However, it will append the data at the bottom of the file. How can I append them side by side like:

-1.000000E+0    5.102000E-10   1.505356E-2    8.315681E+10
-9.000000E-1    4.069000E-10     1.556519E-2    8.639427E+10
-8.000000E-1    3.149000E-10      1.604228E-2    8.955526E+10
-7.000000E-1    2.329000E-10

 

 

Thank,

Joyce

0 Kudos
Message 1 of 4
(2,317 Views)

Hi Joyce,

 

as a spreadsheet file is just a text file with some special formatting codes it will always append at the bottom...

 

But you can:

Load the first data, attach the new data in RAM (using any order you like), write a whole new spreadsheet file!

Best regards,
GerdW


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

Hi, GerdW,

 

How to attach the new data in RAM?

 

Thanks,

Joyce

0 Kudos
Message 3 of 4
(2,310 Views)
Solution
Accepted by topic author Joycezh

Instead of wirting to the file every time, put everything in an array and write it all at once and the end.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 4
(2,308 Views)