Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Class definition EXCEL.APPLICATION is not found.

kiyo

Programmer
Jun 12, 2017
6
JP
My client installed the 64-bit version of Microsoft Office.
A program that edits Excel sheets using Excel automation is now throwing an error.
The error message is: "Class definition EXCEL.APPLICATION is not found."
This program runs without any issues on the 32-bit version of Excel.

The line where the error occurs is:
oExcel = CREATEOBJECT("Excel.Application")

I checked the version of Office and changed it to:
oExcel = CREATEOBJECT("Excel.Application.16")
However, this results in the error:
"Class definition EXCEL.APPLICATION.16 is not found."

Am I missing something?
Do I have to ask the customer to reinstall the 32-bit version?
 
You can also start Excel like this if you are opening a file:

oWB = getobject(this.FileName)
oXL = oWB.application
oWS = oWB.Sheets(1)

Then you can do this:

CellVal = oWS.Cells(1, "A").Value

Not sure about 32 vs. 64, off-hand.
 

Part and Inventory Search

Sponsor

Back
Top