Yogesh Jagota氏恐るべし

Excel Xml Library 3.35 released - Yogesh Jagota's Personal BlogYogesh Jagota's Personal Blog

codeproject A Very Easy to Use Excel XML Import-Export Library.

まだソースコードを見始めた所だが、恐らくはXMLSSフォーマットを利用した実装だろう。(XMLSS.NETがベースか?)

XMLSSを外部から取り込むことは無論のこと、作成したExcelのオブジェクトからXMLSSにエクスポートもできる。XMLへのパースにDOMではなくXMLReader/XMLWriterを使用していることから、実行時の性能も含めて非常に期待できそう。

実際に使ってみないと解らないが、codeprojectの記事のFeaturesを読んだ段階でもう宣言してしまおう。

•Full import and export of Excel XML files
•Access cells from anywhere including ExcelXmlWorkbook, Worksheet, Row, and Cell
•Full support for formulae and ranges
•Imported files' formulae and ranges are parsed to Formula and Range instances
•Multitude of Insert, Delete, and Add functions available for ExcelXmlWorkbook, Worksheet, Row, and Cell
•Auto management of cell references in the book on any change made via any of the Insert, Delete, and Add functions
•Full support for styles in Worksheet, Row, and Cell, and even Range
•No instance declaration; all the dirty work is done by the library
•Cell ContentType, which enables you to know what the cell actually contains
•DataSet to ExcelXmlWorkbook conversion facility
•Absolute and non-absolute ranges and Named ranges
•Auto filter
•Very fast as everything is done via XmlWriter
•Ability to freeze rows or columns, or both
•Almost all print options
•Almost all style options
•Many formatting options
•Hidden columns and rows

感服いたしました。謹んで使わせて頂きます。
これは素晴らしい。

ExcelPackageとOpenXMLが霞んでしまう出来だし、自分が書きたいなと思っていた実装が殆ど入っている。

追伸:

  • Workbook#Exportより抜粋
// Everything is embedded in a Workbook node...
writer.WriteStartElement("Workbook", "urn:schemas-microsoft-com:office:spreadsheet");
// Write Workbook attributes...
writer.WriteAttributeString("xmlns", "o", null, "urn:schemas-microsoft-com:office:office");
writer.WriteAttributeString("xmlns", "x", null, "urn:schemas-microsoft-com:office:excel");
writer.WriteAttributeString("xmlns", "ss", null, "urn:schemas-microsoft-com:office:spreadsheet");
writer.WriteAttributeString("xmlns", "html", null, "http://www.w3.org/TR/REC-html40");

ネームスペースからして、XMLSSのスキーマを使っていることは間違いない。これで完全に決まりだ。