LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem opening excel document that data is written to.

Solved!
Go to solution

Hi,

 

I am trying to write data to a spreadsheet file and I believe I am going through the correct steps but am encountering a problem when I try to open to file.  My filename has the extension .xlsx (Excel 2007) and I open the folder I've specified to creat the file in but when I try to open it it comes up with an error telling me that the file may be in the wrong format or have incorrect extension.  I realize I can just write to a text file and open the text file with Excel but I've been trying to do it this way and just want to know if I am doing something wrong or if it is an issue with Excel.  One helpful tidbit I should probably include is that I'm using LabVIEW 8.6.

 

Thank You,

bsteinma

0 Kudos
Message 1 of 7
(3,129 Views)
Solution
Accepted by topic author bsteinma
Try opening a file with a .xls extension.  See if you get the same error.  In my opinion, the change microsoft did with Office 2007 to come up with these .---x extensions is ridulcous and will cause more problems than its worth.  I have yet to here any advantage to this "new" file format.  Work with the normal .xls files and I bet your problem will go away.
Message 2 of 7
(3,125 Views)

Thank You Ravens Fan,

 

I haven't had a chance to try this yet but I will let you know if it works.  I am using LabVIEW for a senior design project in biomedical engineering just for a little background and am pretty new but have enjoyed getting to know the program.  I believe your solution will work and will let you know tomorrow if it worked.

 

Thanks Again,

bsteinma 

0 Kudos
Message 3 of 7
(3,112 Views)
If you have used the standard "arryay to spreadsheet" function your data will be written in pure ascii text. Try renaming the file to xxxxx.txt. Then you do this Excel will know how to handle it. 


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 4 of 7
(3,100 Views)

Hi bsteinma,

 

Have you tried using "Write to Measurement" (Block Diagram>Programming>File I/O>Write to Measurement File)?

I am using this to record data and open in office 2007, no problems with it.

 

Please let me know how you get on

 

Chaz

Message 5 of 7
(3,088 Views)

Hi bsteinma,

 

you should define the wording "spreadsheet file" more exactly...

 

Are you writing a LabView spreadsheet file? Then you create a tsv (tab separated values) file. If you give it the extension ".txt" (or .dat, or .csv) Excel will open/import it correctly...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,085 Views)

Thanks everyons for the help and input.  Most of the proposed solutions worked in one way or another.  I may revert to creating a text file and then just opening it with Excel.

 

Thanks Again,

bsteinma 

0 Kudos
Message 7 of 7
(3,033 Views)