0

i am getting below error when i try to run below line of code.

code:- private excel.Application app = new excel.Application();

error:- Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.

This code is working fine when microsoft office is install on dev server. but company did not wants to install microsoft office on Production server. So, i have uninstall microsoft office from dev machine.

I have install microsoft office 2010 primary interop assembly(PIARedist.exe). But, still getting same error.

Please help me on this issue.

user990897
  • 177
  • 2
  • 6
  • 21
  • 1
    So you are trying to create an Excel instance on a machine where there is no Excel? - How would that work? - This behaviour is expected. – Alex K. Apr 20 '15 at 12:16
  • But i have install microsoft office 2010 primary interop assembly dll. do you think this will not work? – user990897 Apr 20 '15 at 12:33
  • The interop assembly is an interface to Excel, Excel must be installed if you want to use Excel. – Alex K. Apr 20 '15 at 12:35
  • is their any way to create an excel without excel installed on prd server. microsoft excel is not recommanded to install on prod server. – user990897 Apr 20 '15 at 13:16
  • http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp – Alex K. Apr 20 '15 at 13:23

0 Answers0