Things I like in Office - Excel XML
We have an application which should produce reports in Excel format. The first thing I thought about was to send the client an XML string which conforms to Excel standard, and set the content type to “Application/vnd.excel” (BTW, does anybody knows what the 'vnd' stands for? I have no idea.). Problems began when it was found that the Excel should have some pre-defined formatting, as well as many formulas.
Things started to complicate.
Next thing I was looking at the Web Service Toolkit for Office 2003. A very nice tool indeed. However, I felt uncomfortable with it for two reasons:
1. It looks awkward to retrieve the xls file from the server to the client, and then go back to the server to retrieve the data.
2. Our project is in .NET (naturally...), and I really wanted to avoid using VBA with it. (I can't use .NET for the webservice, since there will be no .NET on the client machines.)
There are some very nice components for creating Excel files on the server, like Softartisans's Excel Writer and Aspose's Aspose.Excel. I've considered using them, and then stumbled across their price.
COMON! More than $1000K for an Excel component? I'll better purchase the whole Office Suite, and put it on a seperate machine, which will solve all my problems.
Well, continue googling.
And then I stumbled across this link. Mmmm.... Interesting. I started investigating about this Excel XML, and it really looked promising. Now I'm quite sure this is the approach I'm going to adopt. No Excel on the server, pure XML / XSL creation, really lovely. Some minor problems were to be solved (with some help from Scott Hanselman) and we all set.
Lessons? There are 1000's way to populate data in Office. The problem is not the “How-To”, but the “Right-To”. And of course, and most important - There's nothing like good old Google.