EasyXLS

Why do I get "Failed to create COM object EasyXLS.ExcelDocument: Class not registered" error in PHP?

The following error might occur at runtime when using EasyXLS Excel library for PHP:

Fatal error: Uncaught com_exception: Failed to create COM object 'EasyXLS.ExcelDocument': Class not registered.

at line:

$workbook = new COM("EasyXLS.ExcelDocument");

Possible reason #1: Windows 64-bit, IIS Server and EasyXLS.dll for 64-bit

If the EasyXLS version for 64-bit is used on a Windows 64-bit operating system, make sure that IIS allows running of 64-bit applications.

Open Internet Information Services (IIS) Manager on Control Panel/Administrative Tools. Select Application Pools and the application pool associated with your web application.

IIS Application Pools

Select Advanced Settings and check if Enable 32-bit Application option is set to false.

IIS 64-bit applications


Possible reason #2: : Windows 64-bit, IIS Server and EasyXLS.dll for 32-bit

If the EasyXLS version for 32-bit is used on a Windows 64-bit operating system, make sure that IIS allows running of 32-bit applications.

Open Internet Information Services (IIS) Manager on Control Panel/Administrative Tools. Select Application Pools and the application pool associated with your web application.

IIS Application Pools

Select Advanced Settings and check if Enable 32-bit Application option is set to true.

IIS 32-bit applications


Possible reason #3: Another EasyXLS.dll previously registered and IIS Server

If another version of EasyXLS.dll was registered, by installer or manually using regsvcs command, IIS Server must be restarted.

It is recommended to delete EasyXLS from Component Services, before registering another EasyXLS.dll.
By uninstalling EasyXLS, EasyXLS component is deleted from Component Services by default. See Register EasyXLS library for details about opening Component Services and how to manually register EasyXLS.dll.


Contact us for any other reasons

If none of the above, contact us at support@easyxls.com with details about your application configuration and the full error message.


Available for: Professional, Excel Writer, Excel Reader, Express Excel Writer
Go to top

EasyXLS Excel libraries:

.NET
Excel Library for PHP
full COM+ version to import, export or convert Excel files
Excel Writer for PHP
COM+ version to create and export Excel files
Excel Reader for PHP
COM+ version to read and import Excel files
Express Excel Writer for PHP
limited COM+ version to create and export Excel files in predefined formats
Download EasyXLS™ Excel Library for .NET

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2019
MS Excel 2021
Office 365
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT