With Excel 2003 and above, you can use the SpreadsheetML format to create Excel spreadsheets with only an XML stylesheet and an XML data file. I used this in some project and it works pretty well, although it is not easy to do. From the Microsoft download site, I downloaded the XSD that makes up SpreadsheetML, and in my ignorance I tried to convert them to C # classes. Unfortunately, xsd.exe is not very happy with these schema files, so I tend to get stuck. I do not need an alternative solution for SpreadsheetML, as it works fine for my needs. It's just that my code will be a little easier to maintain for my team members if it is not written in a complex style sheet. (It sucks to be the only XSLT expert in your company.)
All I want to know if someone has successfully created Excel SpreadsheetML files with .NET without using third-party code and without XSLT. And if you do, how did you decide?
(Or maybe I just need to learn how to add namespaces to XML elements in XML.Linq ...)
source
share