简体   繁体   中英

Embedded excel powerpivot workbook in ASP.NET with sql data connection?

I know that its possible to embed an excel workbook with PowerPivot graphs in an asp.net page but is it also possible to load data from your SQL Server in your workbook and still view the excel workbook in an ASP.NET page.

I have done this before by using SharePoint 2013 but i don't want to be dependent on a SharePoint installation can this be done without ?

SharePoint 2013 has the integration with Office apps. Without that, embedding a workbook is difficult and limited to ActiveX. The default component for this is OWC11 and it can load XML or HTML but it is a pain to work with. And it cannot load an Excel file directly.

The way I would do this is to generate the workbook in C# with your SQL data, serve it as a binary response stream from a URL and then use either SharePoint (which you do not want) or save it as a file and upload it to SkyDrive and use their viewer. Or you can write your own ActiveX control, but it will only work in IE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM