• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

How can I load an xls file and refresh a pivottable using OWC?

We have a classic database reporting setup with SQL Server 2005, ASP .net 2 and IE 6. The reports produced are highly customised and do not neatly fall into datagrid style layouts. Additionally the reports have already been developed to use an excel pivottable embedded in the report to select and layout the data (using GETPIVOTDATA).

We want to make it possible for a user to be able to select a number of parameters from a webpage to filter the data in the report and then make the report available for download.

Can the Office Web Component (OWC) be used to load a copy of the excel template and refresh the pivottable against a stored procedure in SQL?

This works using Excel Automation, however Excel cannot be installed on the webserver; the Office Web Component (OWC) is available. Version 10 is currently installed, although 11 could be installed if necessary.

0
PeterMillsUK
Asked:
PeterMillsUK
1 Solution
 
PeterMillsUKAuthor Commented:
Further research suggests that this is not possible:

http://www.eggheadcafe.com/aspnet_answers/officedeveloperwebcomponents/Aug2006/post27684322.asp

The OWC cannot open XLS files, neither can it open Excel XML files as the file structure is different.
0
 
lynx20Commented:
Hi:

I have never used OWC, do not have any of the components to test, & so I'm depending on what I read in the following after I did some googling to learn what OWC is about.  -

http://www.eggheadcafe.com/articles/20030725.asp

Here is a quote -

To show you how simple it can be to use an Excel spreadsheet with OWC, I created a simple "Loan Calculator" spreadsheet with input cells for Principal, Term, and Interest Rate, and an output cell that uses the Excel PMT() function to compute the monthly payment. We then save this workbook using the "XML Spreadsheet" option available on Excel 2002 and above. This is the only format that the OWC Spreadsheet Component can read and bring in all the formulas, etc. Do not attempt to load a regular XLS file in OWC, it can't be done, period.

Contradicts the message board article you found.  Hope this helps.

Bob
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now