We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
处理 Excel 文件的一种方法是使用 OpenXML SDK 。这需要使用 Office 2007 或更高版本。它的优点在于,您无需通过 Interop,而是直接针对 Excel 文档的 xml 文件进行工作,这使其成为服务器使用的一个不错的选择。缺点是文件的组织方式与通过 Interop 呈现的方式有很大不同,因此弄清楚文件是什么可能是一个挑战。我没有专门使用它进行格式化,但我使用它通过 C# 创建或编辑文档,而且速度非常快。
One approach to working with Excel files is to use the OpenXML SDK. This requires working with Office 2007 or higher. The beauty of it is that instead of going through the Interop, you work directly against the xml file for the Excel document, which makes it a good option for server usage. The downside is that the way the files are organized is fairly different from the way it is presented through Interop, so figuring out what is what can be a challenge. I haven't used it specifically for formatting, but I worked with it for creating or editing documents via C#, and it's blazing fast.
我用的是EPPlus。简单但完成工作!
http://epplus.codeplex.com/
I use EPPlus. Simple but gets the job done!
http://epplus.codeplex.com/
在某种程度上,MSFT 已经开始采用服务器端 excel,其 MS HPC Excel 集成。尽管如此,您可能对 EPPlus - “在服务器上创建高级 Excel 2007/2010 电子表格”感兴趣
EPPlus 支持:
To some extent, MSFT has started to embrace server side excel, with their MS HPC Excel integration. Nonetheless, you may be interested in EPPlus - "Create advanced Excel 2007/2010 spreadsheets on the server"
EPPlus supports:
我很久以前就用过这个,它使用起来非常简单而且速度非常快:
http://www.carlosag.net/Tools/ExcelXmlWriter/" rel="nofollow">http://www.carlosag.net/ carlosag.net/Tools/ExcelXmlWriter/
I used this one long time ago and it was super simple to use and very fast:
http://www.carlosag.net/Tools/ExcelXmlWriter/
如果您需要使用 xls(97 到 2003),您可能需要尝试
http://npoi.codeplex.com/< /a>
NPOI (nuget)
在有限的场景中对我来说效果很好。您可能还想查看:
Artiom Chilaru 的 ExcelLibrary(来源)
ExcelLibrary (nuget)
非常快速且高效。
If you need to work with xls (97 to 2003) you may want to try
http://npoi.codeplex.com/
NPOI (nuget)
Works well for me in a limited scenario. You may also want to look at:
ExcelLibrary (source) by Artiom Chilaru
ExcelLibrary (nuget)
which is very fast and efficient.