1

I'm working on a legacy web application written in classic asp on a Windows Server 2022. Excel 2016 is installed. This has been working fine on an older machine. This is a new instance of the site (on AWS).

Trying to open an uploaded Excel file and get the 'Permission Denied' and references the line;

Set objExcel = CreateObject("Excel.Application.16")

I have granted IIS_IUSRS read, write and execute permission to the file directory and to the Office 16 folder.

Still getting errors.

user692942
  • 16,398
  • 7
  • 76
  • 175
KeithB
  • 11
  • 1

1 Answers1

0

Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ of your system by using Registry Editor app.

There you can find out the name of the class installed.

Something like

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Application

or

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Application.16

or some other class name.

Use that name to create the object.

Set objExcel = CreateObject("<<NAME THAT YOU SEE IN REGISTRY FOR EXCEL>>")
Pavan Chandaka
  • 11,671
  • 5
  • 26
  • 34
  • That entirely depends if it’s the 32 or 64 bit version of Office 2016, as that will change where the classes are registered. – user692942 Apr 13 '22 at 23:17
  • There’s a more comprehensive [check list guide here](https://stackoverflow.com/a/35985827/692942). – user692942 Apr 13 '22 at 23:27