Writes native Excel files quickly and easily, including formatting and multiple sheets. Generate Excel files for ASP.NET sites or .NET applications. Doesn't require Excel on the server or any licensing. Compatible with Excel versions 97 and up.
Download Source (with Sample Solution) or Binaries (for inclusion in your project)
See example code of the simplest possible use of MyXls to generate a blank workbook with one empty sheet, a Hello World example, and a sort of Wacky examply showing writing values as well as adding formatting and specifying metadata. All examples show the actual code-behind files in C# or VB. Stay tuned for VB.NET versions of these as well!
Details
- Create any number of Worksheets
- Name Worksheets
- Write Text/Integer/Decimal values to any cell on any Worksheet - values don't have to be in contiguous ranges
- Supports a good portion of Excel's formatting capabilities (bold, underline, italic, rotation, etc)
- Metadata - write the values displayed in Excel's File->Properties dialog box
- The files generated are 100% compatible with Excel versions 97 and up. They are BIFF8, which is Excel 97-2003's native format, and is fully forward compatible with Excel 2007.
- Pure .NET code - no P/Invokes, Interop assemblies, or Excel COM automation behind the scenes
- No other dependencies - add and reference the MyXls dll in your project and go!
- Fast! (we will be adding some performance metrics)
- Lightweight! The dll is only ~100 KB
Future / Roadmap
- Read functionality to read in existing Excel 97-2003 workbooks (work in progress!)
- Additional documentation (online and in download packages)
- Performance comparisons/enhancements
- Additional formatting (including colors, styles, shading and fills)
- Support for Formulas
- Feasibility of supporting QueryTables, PivotTables, Charting and Graphing not likely but possible in the very long term.
History
MyXls started as a port of ASPBIFF8 from VBScript to C#.NET and is now a project in its own right. Functionality has been added and performance and ease of use improved by way of .NET's much richer native capabilities.
Further back, the Excel File Format (BIFF8) Specification and Microsoft Compound Document (OLE2) Format Specification generated by OpenOffice.org were the detailed blueprints without which this project would not have happened.
Personally, though, it would not have happened without my own bullheaded determination to do something that made me (feel like) a better programmer. I have learned more than I ever thought I wanted to know along the way (binary, endianness, IEEE 754 floating points, charsets, unicode, hexadecimal, etc.).
Related
See the SF.net Project Page for downloads, support, or further information which may not yet be available on this site.
Similar projects include:
You can get more details about some alternative (free) and some of the above methods at AdvanCode.com, including the following methods:
- CSV (Comma-separated values)
- HTML TABLE formatted (Excel 97+)
- XML (Excel 2000+)
- MS Office Web Components / OWC