02-02-2023 03:11 AM - edited 02-02-2023 03:13 AM
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?
Solved! Go to Solution.
02-02-2023 04:27 AM
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!
02-08-2023 08:32 PM
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
02-09-2023 12:56 AM
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?
02-09-2023 01:28 AM
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
02-09-2023 01:32 AM
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.