Click here to Skip to main content
14,664,980 members
Rate this:
Please Sign up or sign in to vote.
See more:
Dear All,

I created a Windows Apps in VB.Net 2010. I got error "unhandled exception has occurred in your application. if you click continue, the application will ignore this error and attempt to continue.

I add the reference called Imports Excel = Microsoft.Office.Interop.Excel.

Is because this error is coming? In local computer not have problem working fine becoz VS2010 installed, but in windows server 2008 have problem. I just copy and paste exe file into server 2008.


Thanks
Basit.
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You can't use Microsoft.Office.Interop.Excel without having ms office installed.
Did you install Excel on your windows server?
   
Comments
basitsar 26-Aug-14 1:32am
   
Thanks David,Not installed. But we cannot add the reference. Becoz for exporting to excel purpose i used. If not then what is the alternate solution.

Thanks
Basit.
David Lee 145 26-Aug-14 1:50am
   
See the below page. I think this is of help to you for exporting excel files.

http://mikesknowledgebase.azurewebsites.net/pages/CSharp/ExportToExcel.htm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100