简体   繁体   English

使用IIS后无法再创建Excel

[英]Can't create Excel anymore after use of IIS

I've created a web application that generates and allows the user to download an Excel file, It worked fine on the Visual Studio LocalHost. 我创建了一个Web应用程序,该应用程序生成并允许用户下载Excel文件。它在Visual Studio LocalHost上运行良好。 After I've launched it to the IIS server everything works just fine except the Generation of the excel file. 将其启动到IIS服务器后,除了生成excel文件外,其他所有功能都可以正常工作。 The code died the first time that he is trying to select range in the work sheet - The error is the NULL error("Object reference...") I guess it kind of permission but I couldn't find one. 该代码在他第一次尝试在工作表中选择范围时就死了-错误是NULL error(“ Object reference ...”)我想这是一种许可,但我找不到。 Any Idea? 任何想法?

Thanks. 谢谢。

As noted in comments use of Office automation is not supported on server side, there are free open source components that can read or generate excel files, and that will work as expected even on server side : 如评论中所述,服务器端不支持使用Office自动化,有一些免费的开源组件可以读取或生成excel文件,即使在服务器端也可以按预期工作:

NPOI (xls) or / and EPPlus (xlsx) NPOI (xls)或/和EPPlus (xlsx)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM