LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data format problem with Write to Spreedsheet File

I have a problem with the data format with Write to spredsheet file.

 

I have an N*3 array, where the 3 elements in each row should has different length. When I used Write to spreedsheet file,

it can only save the three data in one format. How can I save them in the format of "%0.8f %0.3f %0.2f"?

 

Thanks for your help.

0 Kudos
Message 1 of 5
(2,439 Views)

Hi powerplay,

 

WriteToSpreadsheet is made for generic purposes. If you need something special, you have to program something special...

 

Make a for loop to auto-index through your array, use a FormatIntoString inside the loop to format the values. Either append the strings in the loop or use autoindexing andArrayToSpreadsheetstring afterwards...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,435 Views)
I believe the same issue was presented here
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 3 of 5
(2,427 Views)

Hi powerplay,

 

another solution may be to convert column-wise using "number to fractional string", then interleaving resulting arrays and again using "array to spreadsheet string" (with "space" as separator).

 

Many ways lead to Rome Smiley Wink

Best regards,
GerdW


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