tags:

views:

307

answers:

3

I am stuck with a problem

The Requirement is that, there a complex Excel file(XLS) that is used as template; it has Macros and all the worksheets are either locked or hidden. When the user clicks to download it, the follows operation occurs

  • Unlock a particular worksheet, fill some data @ certain cells and then lock it back.
  • Unhide a worksheet, fill some data @ certain cells and then hide it back.

I think there are two options to resolve it (if there are more then please let me know)

  1. Interop libraries / Excel Object Library

  2. OLEDb Driver

I cannot got with the option 1 as excel is not installed on the webserver and I heard that it's not a good option to install MSOffice @ webserver.

My question is that can we use OLDb to perform the operations mentioned above OR is there any other option ??? BTW Sharepoint service is also not available :(

Please help!!!!

A: 

Check out this question I asked some time ago for an overview of options. I ended up going with the Aspose library, which I link to in my original post. It's not cheap, but it does the job very simply and elegantly. It even has templating functionality built in (called SmartMarkers, IIRC).

rmeador
A: 

SpreadsheetGear for .NET will handle this and has an API which is very similar to Excel. You can see what our customers say and download the free, fully functional evalution here.

Joe Erickson
+1  A: 

You could maybe try ExcelPackge.
See this article:
Server-Side Creation of Excel 2007 Files Using .NET 3.0 and Office Open XML

see also: Office Space - Building Office Open XML Files

tyndall