Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

You can't use Microsoft.Office.Interop.Excel without having ms office installed.
Did you install Excel on your windows server?
 
Share this answer
 
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900