Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a web application that reads in and creates excel spread sheets. I was on a server with Excel 2003/Windows 2003 and I was referencing Microsoft.Office.Interlop.Excel 11.0. The powers-to-be moved me to a server with Windows 2008 and Excel 2007 on it. I changed my reference to Excel version 12.0. It still works on my development machine but I can't create the excel file on the new server.

My references are:
add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
add assembly="office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
add assembly="Microsoft.Vbe.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"

Am I missing a reference? Any help will be appreciated.
Posted
Updated 3-Jun-10 7:03am
v2

I fixed the problem by following these instructions...

http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

but now I get this error when I try to create an excel sheet…

Unable to create Name.xlsx: Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need. • To free disk space, delete files you no longer need from the disk you are saving to.
 
Share this answer
 
Maybe you should use 'late binding' instead of 'early binding'.
This way, you don't have to worry about all the different versions
of Excel being used/installed.

Just Google 'create/open Excel sheet using late binding' and you'll
find numerous examples.
 
Share this answer
 
Comments
Battlehammer 4-Jun-10 10:52am    
Thanks for the suggestion, I will implement the late binding. I wish I knew of that in the begining.
I rebooted the server and now it works, go figure. :)
 
Share this answer
 

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