LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Object Library and Invalid Properties

Hello all,
 
I am simply trying to write to specific cells on an excel spreadsheet.  I have two PC's with LabVIEW and microsoft office 2000 and windows 2000.  I downloaded a "Save to Excel" vi, which works on one PC but not the other.
 
On one PC, in the microsoft office folder, there is the EXCEL9.OLB file and this is displayed in labview, select activeX Class, Type Library, as "Microsoft Excel 9.0 Object Library Version 1.3".  This all works fine with no problems.
 
However on my other PC, the EXCEL9.OLB does not exist, only the XL5EN32.OLB is present.  Therefore I copied the EXCEL9.OLB file into the folder.  In LabVIEW, I try to select this file, however under Type Library, it just displays the existing library "Microsoft Excel 5.0 Object Library Version 1.0".  I believe this is the cause of the problems.  Using the "Save to Excel" vi, there are invalid properties and methods, and ones that dont exist if I select the 5.0 library.  I know that with Excel 2000, I need to use the 9.0 library.
 
I am also having errors with using the Report Generation toolkit on this PC, with invalid properties and causing the vi's to be non executable, which Im guessing is to do with the same thing.
 
Any help would be appreciated.
 
Thanks
 
Kev
0 Kudos
Message 1 of 5
(4,067 Views)
Hi,
 
My experience is: Writing and reading data to/from Excel with ActiveX works fine on different PC's if they all have the same versions of  MsOffice.
 
My advise: If you want to do this with different versions of Office, don't even think about it. Use the spreadsheet files from LV
 
0 Kudos
Message 2 of 5
(4,062 Views)

I am using exactly the same version of microsoft excel on PC and laptop as shown in "About" menu on Excel.  It's just that on my PC when I select Type Library and select the correct EXCEL9.OLB file, it always defaults to Microsoft Excel 5.0 Object library. (independent of where i put the .OLB file)

This does not happen on my laptop, which when EXCEL9.OLB is selected, it shows Microsoft 9.0 Object library.

The only difference is that on my laptop, all labview installations are on C: drive, but on the PC, some is on the C: drive and some is on the 😧 drive.

Kev

0 Kudos
Message 3 of 5
(4,060 Views)

Hi kev,

I think there must be a difference in the office install. Maybe something from a previous install ?

Uninstall office (and delete files) and install again an option ?  Sorry can't come up with anything better  Smiley Wink

0 Kudos
Message 4 of 5
(4,054 Views)

Problem sorted after a reinstall of Microsoft Office, such that the correct Excel library is now listed in Labview Type Library listbox.

 

0 Kudos
Message 5 of 5
(4,046 Views)