参考Excel 2007 [英] Reference Excel 2007

查看:161
本文介绍了参考Excel 2007的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个Web应用程序,可以读取并创建Excel电子表格.我在装有Excel 2003/Windows 2003的服务器上,并且正在引用Microsoft.Office.Interlop.Excel 11.0.强大的功能将我转移到了装有Windows 2008和Excel 2007的服务器上.我更改了对Excel版本12.0的引用.它仍然可以在我的开发机器上运行,但是我无法在新服务器上创建excel文件.

我的参考资料是:

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.

推荐答案

我已按照以下说明解决了问题...

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

但是现在当我尝试创建一个excel工作表时出现此错误…

无法创建Name.xlsx:Microsoft Office Excel无法打开或保存更多文档,因为没有足够的可用内存或磁盘空间. •要提供更多的内存,请关闭不再需要的工作簿或程序. •要释放磁盘空间,请从要保存到的磁盘中删除不再需要的文件.
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.


也许您应该使用后期绑定"而不是早期绑定".
这样,您不必担心所有不同的版本
正在使用/安装的Excel版本.

只需Google使用后期绑定创建/打开Excel工作表",您就可以
找到许多示例.
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.


我重新启动了服务器,现在它可以正常工作了,图. :)
I rebooted the server and now it works, go figure. :)


这篇关于参考Excel 2007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆