我正在开发一个 ASP 项目,我需要根据一些验证检查更改单元格的颜色并将其返回给用户。
目前我已经使用 Excel 12.0 对象库成功实现了这个功能。
但问题是我需要提高性能。 InterOp 库比我预期的要慢得多。
有什么方法可以在不使用 InterOp 库的情况下格式化 Excel 工作表上的单元格。
(比如使用 OleDb 连接和格式化连接)??
请分享您的知识
最佳答案
尝试使用 codeplex 中的 ExcelPlusPlus 库。它没有使用 OleDB
EPPlus link
来自 codeplex:
Create advanced Excel 2007/2010 spreadsheets on the server
EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).
EPPlus supports:
Cell Ranges
Cell styling (Border, Color, Fill, Font, Number, Alignments)
Charts
Pictures
Shapes
Comments
Tables
Protection
Encryption
Pivot tables
Data validation
Conditional formatting
VBA
Many more...
关于c# - 有没有办法使用 C# 更改 Excel 单元格的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13467054/