简体   繁体   English

带有sql数据连接的ASP.NET中的嵌入式Excel PowerPivot工作簿?

[英]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. 我知道可以将带有PowerPivot图的excel工作簿嵌入到asp.net页面中,但是也可以从您的工作簿中的SQL Server加载数据,并且仍然可以在ASP.NET页面中查看excel工作簿。

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做到了这一点,但是我不想依赖于SharePoint安装吗?

SharePoint 2013 has the integration with Office apps. SharePoint 2013具有与Office应用程序的集成。 Without that, embedding a workbook is difficult and limited to ActiveX. 否则,很难嵌入工作簿,并且仅限于ActiveX。 The default component for this is OWC11 and it can load XML or HTML but it is a pain to work with. 默认组件是OWC11,它可以加载XML或HTML,但是使用起来很麻烦。 And it cannot load an Excel file directly. 而且它不能直接加载Excel文件。

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. 我这样做的方法是用SQL数据在C#中生成工作簿,将其作为URL的二进制响应流使用,然后使用SharePoint(不需要)或将其另存为文件并上传到SkyDrive并使用其查看器。 Or you can write your own ActiveX control, but it will only work in IE. 或者,您可以编写自己的ActiveX控件,但仅在IE中有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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