Monday, September 28, 2009

Creating a Web Service around an Excel File

Need to create a Web Service around an Excel File ??

Here is a simple way to do so, without using .Net interop to Excel (that could raise issues in memory usage, even if COM objects are properly cleaned up).

As far as I am concerned, I used Aspose.Cells for .NET, which is a simple, but powerfull library to :
1/ Send values to my Excel WCF service,
2/ Let Excel perform all the complexe sums (most importantly, let a non technical users to update the Excel files),
3/ Gets the data and convert them into ADO.Net, so that it could be DataBound easily,
4/ Get all the returned values back to my orginal application,

A stress/load test on the solution proves that it can handle a great amount of calls.

PS: Other possibilities could be EXCEL Services from MOSS Enterprise, Office 2010 (EXCEL Web Access), ...