Can't create Excel anymore after use of IIS

倖福魔咒の 提交于 2021-02-17 06:53:06

问题


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. After I've launched it to the IIS server everything works just fine except the Generation of the excel file. 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. Any Idea?

Thanks.


回答1:


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 :

NPOI (xls) or / and EPPlus (xlsx)



来源:https://stackoverflow.com/questions/9993595/cant-create-excel-anymore-after-use-of-iis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!