Using Microsoft Office Interop to create and parse Excel spreadsheets from ASP.NET

瘦欲@ 提交于 2020-01-01 00:53:31

问题


I have a new ASP.NET MVC project that has two requirements that require using the Office Interop DLLs to generate Excel spreadsheet files in Excel 2003 format by combining several template files into a multi-sheet workbook and to parse these files once filled in. The files we parse may come back in Excel 2003, 2007 or 2010 format (I believe 2007 and 2010 file formats are identical but feel free to correct me on that).

I'd be much happier if we could convince the (internal) clients to drop this requirement. They have been made aware of the risks in this type of work and still want to go ahead so now I'm looking for good references to help get us started and have had some trouble narrowing down the correct keywords to search for.

Thanks.


回答1:


Using Excel interop on the server is a reallyy bad idea. http://support.microsoft.com/kb/257757

Alternatives are:

Open source

Excel 2003 ExcelLibrary http://code.google.com/p/excellibrary/downloads/list

NPOI http://npoi.codeplex.com/

Excel 2007

ExcelPackage http://excelpackage.codeplex.com/

Commercial

Aspose Cells http://www.aspose.com/categories/.net-components/aspose.cells-for-.net/default.aspx



来源:https://stackoverflow.com/questions/3359864/using-microsoft-office-interop-to-create-and-parse-excel-spreadsheets-from-asp-n

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