LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with writing spreadsheet

Solved!
Go to solution

Hello,

Guys can anbody help me with this thing, I have problem with writing spreadsheet file. I am upload picture of my program in LabVIEW.

When I run program everything working as well and excel file is filled with data I saw size of file how rising. But when I want to open file to check I got this message in "pic2". 

 

So can anbody help me what should I do ? Is problem in my LabVIEW or ? 

 

Many thanks in advance.

Download All
0 Kudos
Message 1 of 9
(3,836 Views)
Solution
Accepted by topic author dony_92

Hi dony,

 

easy answer: don't use the suffix "xlsx" for your spreadsheet file. Use "csv" instead -  because that is what you create!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(3,824 Views)

You cannot write an xlsx file.  That is some propriatary format that Microsoft uses.  Since you are use a comma as your delimiter, save your file at a csv.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 9
(3,818 Views)

Thank you a lot ! Its working now.

 

But check this now, from 38 row start to write. What could be this until 38 ?

0 Kudos
Message 4 of 9
(3,806 Views)

Thank you a lot ! Its working now.

 

But check this now, from 38 row start to write. What could be this until 38 ?

Download All
0 Kudos
Message 5 of 9
(3,802 Views)

Garbage…

 

Have you overwritten some older (already existing) file?

 

Please provide as much information as possible!

Best regards,
GerdW


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

No I make new excel file and change format from .xslx to .csv as Test.csv. Take this as file path and run program, but when I open again same thing, is there any chance for example to make some loop and to write every 5 minute value, maybe this garbage is generated until my signal is come to the write spreadsheet ?

0 Kudos
Message 7 of 9
(3,785 Views)

Since you are just constantly adding on the file, you are just seeing Excel's attempt at fixing the file from before.  You really should have your program create a new file each time it is ran.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(3,778 Views)

@dony_92 wrote:

No I make new excel file and change format from .xslx to .csv as Test.csv.


Don't do that.  When you create an Excel file, it has stuff in the file that just looks like garbage (it really is data that Excel needs in order to read what is in the xlsx file).  What's wrong with just letting your program create the file?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(3,775 Views)