LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView meas data to excel

Solved!
Go to solution

Hello,

I'd like to ask you a question about how to save the measurement data to Excel.

First, I made the measurement data on Excel.vi and saved the data to Excel.

However, the size of the Excel saved through the code is 5KB.
When I opened this Excel and saved it again, it changed to 11KB.

When I downloaded an Excel file similar to the measurement data I saved on the Internet, I checked that it was 11KB.
I realized that this was stored accurately.

An error appears when I try to open an 5KB Excel file for connection with the Python code.

Is there a way to save the Excel file correctly?

 

yhpark37_0-1675328933195.png

 

0 Kudos
Message 1 of 6
(868 Views)
Solution
Accepted by yhpark37

Hi yhpark,

 


@yhpark37 wrote:

An error appears when I try to open an 5KB Excel file for connection with the Python code.

Is there a way to save the Excel file correctly?


The file is a valid Excel XLSX file, so you already write it "correctly". Maybe you need to update the "Python code"…

 

Suggestion: as the ExpressVI internally saves the data with just 6 significant digits you can create CSV files instead. Excel can handle them, LabVIEW and any other programming language too!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(844 Views)

Thank you for your reply.

 

However, the problem has not yet been resolved.
Both the csv file and the xlsx excel file have a size of 5KB and want to save it as 11KB, which is the exact size.
Is there any way to do it through the LabView?

 

Best regards,

yhpark

0 Kudos
Message 3 of 6
(788 Views)

Hi yhpark,

 


@yhpark37 wrote:

Both the csv file and the xlsx excel file have a size of 5KB and want to save it as 11KB, which is the exact size.


This doesn't make any sense...

Your VI creates a valid XLSX file, no matter which filesize!

The filesize is no good indicator for "valid Excel files" because CSV contains ASCII text, while XLSX files are compressed ZIP files under the hood. And their content is defined by XML files which contain much more text than your simple CSV file!

 


@yhpark37 wrote:

Is there any way to do it through the LabView?


LabVIEW creates valid XLSX files so what else do you need?

Best regards,
GerdW


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

Hi GerdW,

 

When i save measurement data to Excel with LabView, the file size depends on the number of data. (ex) 5KB, 6KB...) However, when i open and save this file again, it is usually saved with an additional 6KB size. (ex) 11KB, 12KB...)


Is it because it is saved in a compressed zip format when saved in Excel as you said?

I understand that Labview stores valid Excel files( typically 5KB), but what is the difference from downloading similar numbers of data be available on the Internet (typically 11KB) ?

 

Best regards,

yhpark

0 Kudos
Message 5 of 6
(770 Views)

Sorry, I downloaded the data available on the Internet, opened it again, and saved it, and I found that the size of the file changed. First of all, I'll have to find a lot of ways to solve it. Thank you for your reply.

0 Kudos
Message 6 of 6
(767 Views)