OpenExcel = fast and accurate creation of Excel 2007 spreadsheets
A fast and accurate OpenXML spreadsheet library. Creates 500,000 cells in <10secs. Efficient inserting of rows/columns that automatically updates formulas on all sheets. Also features an OLE DB-based reader for Excel 97-2003 files.
Features
- Fast data generation -- a new workbook with 500,000 cells of unique strings can be generated in less than 10 seconds.
- Insert rows and columns
- Use InsertRow() and InsertColumn() methods to copy the style of the previous row/column just like in Excel.
- Use PushRow() and PushColumn() methods to insert unstyled rows/columns instead.
- Formulas and conditional formatting are updated automatically on all worksheets.
- Formulas
- You can copy a formula from one cell to another and the references in the formula are translated automatically, just like copy-pasting in Excel.
worksheet.Cells["C1"].Formula.Text = "A1+B1+$E$1";
worksheet.Cells["C1"].Formula.CopyTo("C2"); // A2+B2+$E$1
worksheet.Cells["C1"].Formula.CopyTo("C3"); // A3+B3+$E$1
worksheet.Cells["C1"].Style.NumberFormat.Format = "0.00";
worksheet.Cells["C1"].Style.Font.Name = "Verdana";
worksheet.Cells["C1"].Style.Fill.BackgroundColor = "FFFF00FF";
worksheet.Cells["C1"].Style.Border.TopStyle = ExcelBorderStyleValues.Double;
- Excel 97-2003
- Use OleDbExcelReader for reading .xls files using OLE DB
OpenExcel requires
OpenXML SDK 2.0.
Roadmap
- Styles support
- v0.1 --Setting of generic date format when setting a cell value to DateTime is already supported.
- v0.3 -- added styles support, using OpenXML API objects
- v0.3.1 -- native style objects
- Shared formula support -- problem especially when deleting formulas
- Multi-cell range functions
- R1C1 support
- Copy sheet
- Other ideas
- "Stream" editing -- provide another API to do loading, insertions and deletions and saving of sheet data at the same time to improve performance