LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Compatibility with Microsoft Office Excel 2007

I am using LabVIEW 8.5 with Microsoft Office 2007 on Windows XP on one computer and LabVIEW 8.6 with Microsoft Office 2003, WIndows Vista on another computer.

 

I wrote a program which writes some data to an excel sheet. The output of the program is as expected in LabVIEW 8.6 + Office 2003 + Windows Vista.

 

However, when I run the same program on LabVIEW 8.5 + Office 2007 + Windows XP, after the program execution is complete, when I try to open the excel file in Office 2007, it displayes an error message that "Unreadable content.". Is it an issue with compatibility of LabVIEW 8.5 with Microsoft Office 2007?

0 Kudos
Message 1 of 7
(3,906 Views)
LabVIEW neither knows or cares what version of Excel you are using. However, you are using specific methods and properties for a version of Excel and Microsoft changes those properties and methods from one version to another. You may need a diiferent version of your program. Or, find a more neutral format such as text or a datbase for saving your data.
0 Kudos
Message 2 of 7
(3,896 Views)

Hello Dennis,

 

Thank you very much for your reply. Please find the attached program, which I have to run on the specified two combinations. In Excel 2003, I get the expected output, but not in Excel 2007. Can you please help me what modifications should I make to this program in order to get the same output.

 

In excel 2007, when I try to open the sheet after executing the program, an error message "Unreadable Content"  is displayed.

 

Thank you,

Vilas V Jangale

0 Kudos
Message 3 of 7
(3,853 Views)
What you are doing has nothing to do with Excel.  Your VI just creates a text file.  A text file can be opened/imported into Excel.  If one version of Excel doesn't like the import, but the other does, check the means of importing the data into Excel.  Perhaps one version has different default settings on how to handle the importing of a text file.
0 Kudos
Message 4 of 7
(3,850 Views)
One more thing.  With the Write to Spreadsheet File function (which is poorly named because it doesn't actually make a spreadsheet file, just a text file that can be opened in a spreadsheet program), you have a 1-D array input and a 2-D array input.  Only one of these is supposed to be wired, but you have both wired.  Only the 1-D array will go through to the data file.  If the 1-D array is empty, then the 2-D array will go through.  1-D vs. 2-D input is an either/or proposition.  It is essentially a polymorphic VI, doesn't really use the polymorphic methods that the new LabVIEW VI's have.
Message 5 of 7
(3,838 Views)

Hi Vills,

 

Ravens Fan brings up what I noticed at first as well - the polymorphic nature of the Write to Spreadsheet File means you can only wire in 2D or 1D data.

 

It shouldn't matter what version of Excel you're using for that VI. On the other hand, if you're using the Report Generation Toolkit, it very much matters what version of Office and LabVIEW you have. Please check out this KB: Report Generation Toolkit Compatibility with Microsoft Office and LabVIEW.

 

Try removing writing both 1D and 2D data and see what happens.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 6 of 7
(3,810 Views)

Hi:

It remains true however, that Excel 2007 complains about reading the text formatted files.  That is a "feature" of Excel 2007 for files that are not in Excel native format.  You can still import the data into Excel, but clicking on the text file (even if it is named with an extension of .xls or .xlsx) and expecting Excel 2007 to open it without complaint will not happen.  You can write files in native Excel format from LabVIEW using ActiveX, but then you face the situation that the ActiveX interface changes with each new release of Excel.  Thank you Microsoft.

BJ

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