System.Runtime.InteropServices.COMException (0x80040154)
-
Dear all, I have a application that writes some data to excel sheet. Ofter installing my application on a PC with no Office, when i run it, im getting this error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154. at QeKms.Classes.Export.ExportToExcel(DataTable dt, String path) at QeKms.Classes.Export.ExportData() The Microsoft.Office.Interop.Excel.dll is included in the application directory. What is this error mean? Do i have to install MS Office on each computer before running my application? Thanks in advance
-
Dear all, I have a application that writes some data to excel sheet. Ofter installing my application on a PC with no Office, when i run it, im getting this error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154. at QeKms.Classes.Export.ExportToExcel(DataTable dt, String path) at QeKms.Classes.Export.ExportData() The Microsoft.Office.Interop.Excel.dll is included in the application directory. What is this error mean? Do i have to install MS Office on each computer before running my application? Thanks in advance
Office.Interop.Excel works by invisibly opening a copy of excel in the background to perform the work - just as you would expect. So yes, you do need Office (or at least the correct version of excel) installed on every machine your software is going to run on.
All those who believe in psycho kinesis, raise my hand.
-
Dear all, I have a application that writes some data to excel sheet. Ofter installing my application on a PC with no Office, when i run it, im getting this error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154. at QeKms.Classes.Export.ExportToExcel(DataTable dt, String path) at QeKms.Classes.Export.ExportData() The Microsoft.Office.Interop.Excel.dll is included in the application directory. What is this error mean? Do i have to install MS Office on each computer before running my application? Thanks in advance
-
Thanks for response. Are you sure about that? Do i have to really install ms excel in all machines where i want to run my app? :sigh:
Sorry about the delay in replying, but if you had posted it as a reply to my message, rtaher than yours, I would have got an email to tell me there was a reply! By luck I saw this, so can answer... Yes. You have to have Excel installed on every machine that you want to run your app on, if your app uses Interop.Excel. You will get an exception otherwise (as you have seen!)
All those who believe in psycho kinesis, raise my hand.
-
Sorry about the delay in replying, but if you had posted it as a reply to my message, rtaher than yours, I would have got an email to tell me there was a reply! By luck I saw this, so can answer... Yes. You have to have Excel installed on every machine that you want to run your app on, if your app uses Interop.Excel. You will get an exception otherwise (as you have seen!)
All those who believe in psycho kinesis, raise my hand.