LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use write to spreadsheet VI to export data to excel?

Solved!
Go to solution

Hi Vanessa,

 

that's ReplaceArraySubset.

 

You don't need it. Use a BuildArray instead, no need for shift register, array constant and ReplaceArraySubset…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 27
(6,429 Views)

Hi Gerald,

 

I am referring to the array block that is connected to an empty string and a comma. Is it replace array subset as well?

 

Vanessa

0 Kudos
Message 12 of 27
(6,425 Views)
Solution
Accepted by topic author VanessaWen

Hi Vanessa,

 

that is ArrayToSpreadsheetString, also to be found in the array palette…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 27
(6,423 Views)

Gerald,

 

Thanks a lot! 😄

 

Vanessa

0 Kudos
Message 14 of 27
(6,419 Views)

Hi Anand,

 

I have tried to use your code exactly. It works. However, I would like to add in header for each column. Any idea how should I start? Thanks!

 

Regards,

Vanessa

0 Kudos
Message 15 of 27
(6,417 Views)

Check the attached VI. You don't need Insert into array when you are using Replace Array subset.

 

(I am not able to attach VI, thats why I have attached zip file.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 16 of 27
(6,406 Views)

Hi Anand, 

 

The zipfile does not contain any vi. Perhaps you can share to me the basic idea to implement the column header?  Thanks!

 

Regards,

Vanessa

0 Kudos
Message 17 of 27
(6,377 Views)

Check the attached snippet. This writes the header before starting the data acquisition.

 

WriteToFileWithHeader.png

 

Note: The data can be 1D or 2D array. If you find the data is not in proper column/row try to use Transpose array (While using the 2D array).

-----

The best solution is the one you find it by yourself
0 Kudos
Message 18 of 27
(6,368 Views)

HI Anand,

 

Great! Thank you so much for the explanation. I really appreciate it. Thank again. Smiley Very Happy

 

Regards,

Vanessa

0 Kudos
Message 19 of 27
(6,362 Views)

How did you get that to save as an .xlsx file because when I attempt to open the file excel says it can't read it?

0 Kudos
Message 20 of 27
(6,122 Views)