EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).
It does not require Excel to be installed on the server. It doesn't use Excel libraries, it is just an API interface to the Open Office XML format (xlsx). XLSX is actually just a a zip file with a folder structure and xml files inside to describe the layout and data of the spreadsheet.
假设您的意思是 ASP.NET MVC 尝试在服务器上运行 Excel,答案是不建议这样做。 Excel 实际上被设计为桌面应用程序,因此在服务器上运行它可能会导致一些问题,如 中所述MSDN 文章。
如果您可以针对 Excel 2007/2010,一个不错的替代方案是使用 Open Office XML 库来创建、读取或修改 Excel 工作簿,而无需实例化和 Excel 实例。看看 www.openxmldeveloper.org
Assuming you mean ASP.NET MVC trying to run Excel on the server, the answer is that it's not recommended. Excel is really designed as a desktop app, so running it on a server can cause some problems, as described on in this MSDN article.
If you can target Excel 2007/2010, a good alternative is to use the Open Office XML libraries to create, read or modify Excel workbooks without instantiate and Excel instance. Take a look at www.openxmldeveloper.org
发布评论
评论(2)
EPPlus
EPPlus 是一个 .net 库,它使用 Open Office Xml 格式 (xlsx) 读取和写入 Excel 2007/2010 文件。
它不需要在服务器上安装 Excel。它不使用 Excel 库,它只是 Open Office XML 格式 (xlsx) 的 API 接口。 XLSX 实际上只是一个 zip 文件,其中包含文件夹结构和 xml 文件,用于描述电子表格的布局和数据。
epplus.codeplex.com。 codeplex 网站有大量示例,还有一个 额外的博文包含更多内容。
只是将其作为实际答案放在这里。
EPPlus
EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).
It does not require Excel to be installed on the server. It doesn't use Excel libraries, it is just an API interface to the Open Office XML format (xlsx). XLSX is actually just a a zip file with a folder structure and xml files inside to describe the layout and data of the spreadsheet.
epplus.codeplex.com. The codeplex site has tons of examples plus here's an additional blogpost with more.
Just putting this here as an Actual answer.
假设您的意思是 ASP.NET MVC 尝试在服务器上运行 Excel,答案是不建议这样做。 Excel 实际上被设计为桌面应用程序,因此在服务器上运行它可能会导致一些问题,如 中所述MSDN 文章。
如果您可以针对 Excel 2007/2010,一个不错的替代方案是使用 Open Office XML 库来创建、读取或修改 Excel 工作簿,而无需实例化和 Excel 实例。看看 www.openxmldeveloper.org
Assuming you mean ASP.NET MVC trying to run Excel on the server, the answer is that it's not recommended. Excel is really designed as a desktop app, so running it on a server can cause some problems, as described on in this MSDN article.
If you can target Excel 2007/2010, a good alternative is to use the Open Office XML libraries to create, read or modify Excel workbooks without instantiate and Excel instance. Take a look at www.openxmldeveloper.org