OWC 数据透视表工具箱项目对于 WebForm 呈灰色

发布于 2024-08-17 06:20:51 字数 127 浏览 3 评论 0原文

我正在尝试使用 OWC 在 vb.net 2005 中的 Web 表单上构建数据透视表。我已将可透视项添加到工具箱中,但它呈灰色,因此我无法使用它。如果我开发 Winform 而不是 Webform,那么工具箱项目就在那里并且可以正常工作。

I'm trying to build a Pivottable on a webform in vb.net 2005 using OWC. I have added the Pivottable item to the toolbox, but it is grayed out and so I cant use it. If I develop a Winform instead of a Webform then the toolbox items are there and work correctly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青巷忧颜 2024-08-24 06:20:51

“Office Web 组件”是 ActiveX 控件。您无法通过 WebForms 设计器将它们添加到网页。这就是它们被禁用(灰显)的原因。 WinForms 可以承载 ActiveX 控件,这就是设计表单时不会禁用这些组件的原因。

要将数据透视表添加到网页,请使用 object 元素并指定 classid 为“clsid:0002E55A-0000-0000-C000-000000000046”。请参阅下面的示例。


示例

以下是使用 FrontPage 2003 将数据透视表添加到网页时生成的代码。

<object classid="clsid:0002E55A-0000-0000-C000-000000000046" id="PivotTable1">
    <param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
 <x:PivotTable>
  <x:OWCVersion>11.0.0.8304         </x:OWCVersion>
  <x:DisplayScreenTips/>
  <x:CubeProvider>msolap.2</x:CubeProvider>
  <x:CacheDetails/>
  <x:PivotView>
   <x:IsNotFiltered/>
  </x:PivotView>
 </x:PivotTable>
</xml>">
    <table width="100%" cellpadding="0" cellspacing="0" border="0" height="8">
    <tr>
    <td bgcolor="#336699" height="25" width="10%"> </td>
    <td bgcolor="#666666" width="85%"><font face="Tahoma" color="white" size="4"><b>  Missing: Microsoft Office Web Components</b></font></td>
    </tr>
    <tr>
    <td bgcolor="#cccccc" width="15"> </td>
    <td bgcolor="#cccccc" width="500px"><br>
    <font face="Tahoma" size="2">This page requires the Microsoft Office Web Components.<p align="center"> <a href="D:/ENGLISH/OFFICE_SYSTEM/OFFICEPRO2003/files/owc11/setup.exe">Click here to install Microsoft Office Web Components.</a>.</p></font><p><font face="Tahoma" size="2">This page also requires Microsoft Internet Explorer 5.01 or higher.</p><p align="center"><a href="http://www.microsoft.com/windows/ie/default.htm"> Click here to install the latest Internet Explorer</a>.</font><br> </td>
    </tr>
    </table>
</object>

以下是使用 SharePoint Designer 2007 将数据透视表添加到 Web 页时生成的代码。

<object classid="clsid:0002E55A-0000-0000-C000-000000000046" id="PivotTable1">
    <param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
 <x:PivotTable>
  <x:OWCVersion>11.0.0.8304         </x:OWCVersion>
  <x:DisplayScreenTips/>
  <x:CubeProvider>msolap.2</x:CubeProvider>
  <x:CacheDetails/>
  <x:PivotView>
   <x:IsNotFiltered/>
  </x:PivotView>
 </x:PivotTable>
</xml>" />
</object>

以下是使用 Microsoft Excel 2003 的“另存为网页”并选中“添加交互性”时生成的代码。

<!--[if !excel]>  <![endif]-->
<!--The following information was generated by Microsoft Office Excel's Publish
as Web Page wizard.-->
<!--If the same item is republished from Excel, all information between the DIV
tags will be replaced.-->
<!----------------------------->
<!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD -->
<!----------------------------->

<div id="Book1_31522" align=center x:publishsource="Excel"><object
 id="Book1_31522_Spreadsheet"
 classid="CLSID:0002E559-0000-0000-C000-000000000046">
 <param name=DisplayTitleBar value=false>
 <param name=Autofit value=true>
 <param name=DataType value=XMLData>
 <param name=XMLData
 value="[AMJ - REMOVED FOR POSTING]">
 <p style='margin-top:100;font-family:Arial;font-size:8.0pt'>To use this Web
 page interactively, you must have Microsoft® Internet Explorer 5.01 Service
 Pack 2 (SP2) or later and the Microsoft Office 2003 Web Components.</p>
 <p style='margin-top:100;font-family:Arial;font-size:8.0pt'>See the <a
 href="http://r.office.microsoft.com/r/rlidmsowcpub?clid=1033&p1=Excel">Microsoft
 Office Web site</a> for more information.</p>
</object></div>


<!----------------------------->
<!--END OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD-->
<!----------------------------->

The "Office Web Components" are ActiveX controls. You cannot add them to a web page through the WebForms designer. That is why they are disabled (grayed out). WinForms can host ActiveX controls, and that is why the components are not disabled when designing forms.

To add the PivotTable to a web page, use the object element and specify the classid of "clsid:0002E55A-0000-0000-C000-000000000046". See samples below.


Sample

Following is the resulting code when adding the PivotTable to a web page using FrontPage 2003.

<object classid="clsid:0002E55A-0000-0000-C000-000000000046" id="PivotTable1">
    <param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
 <x:PivotTable>
  <x:OWCVersion>11.0.0.8304         </x:OWCVersion>
  <x:DisplayScreenTips/>
  <x:CubeProvider>msolap.2</x:CubeProvider>
  <x:CacheDetails/>
  <x:PivotView>
   <x:IsNotFiltered/>
  </x:PivotView>
 </x:PivotTable>
</xml>">
    <table width="100%" cellpadding="0" cellspacing="0" border="0" height="8">
    <tr>
    <td bgcolor="#336699" height="25" width="10%"> </td>
    <td bgcolor="#666666" width="85%"><font face="Tahoma" color="white" size="4"><b>  Missing: Microsoft Office Web Components</b></font></td>
    </tr>
    <tr>
    <td bgcolor="#cccccc" width="15"> </td>
    <td bgcolor="#cccccc" width="500px"><br>
    <font face="Tahoma" size="2">This page requires the Microsoft Office Web Components.<p align="center"> <a href="D:/ENGLISH/OFFICE_SYSTEM/OFFICEPRO2003/files/owc11/setup.exe">Click here to install Microsoft Office Web Components.</a>.</p></font><p><font face="Tahoma" size="2">This page also requires Microsoft Internet Explorer 5.01 or higher.</p><p align="center"><a href="http://www.microsoft.com/windows/ie/default.htm"> Click here to install the latest Internet Explorer</a>.</font><br> </td>
    </tr>
    </table>
</object>

Following is the resulting code when adding the PivotTable to a web pge using SharePoint Designer 2007.

<object classid="clsid:0002E55A-0000-0000-C000-000000000046" id="PivotTable1">
    <param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
 <x:PivotTable>
  <x:OWCVersion>11.0.0.8304         </x:OWCVersion>
  <x:DisplayScreenTips/>
  <x:CubeProvider>msolap.2</x:CubeProvider>
  <x:CacheDetails/>
  <x:PivotView>
   <x:IsNotFiltered/>
  </x:PivotView>
 </x:PivotTable>
</xml>" />
</object>

Following is the resulting code using Microsoft Excel 2003's Save As Web Page, with "Add interactivity" checked.

<!--[if !excel]>  <![endif]-->
<!--The following information was generated by Microsoft Office Excel's Publish
as Web Page wizard.-->
<!--If the same item is republished from Excel, all information between the DIV
tags will be replaced.-->
<!----------------------------->
<!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD -->
<!----------------------------->

<div id="Book1_31522" align=center x:publishsource="Excel"><object
 id="Book1_31522_Spreadsheet"
 classid="CLSID:0002E559-0000-0000-C000-000000000046">
 <param name=DisplayTitleBar value=false>
 <param name=Autofit value=true>
 <param name=DataType value=XMLData>
 <param name=XMLData
 value="[AMJ - REMOVED FOR POSTING]">
 <p style='margin-top:100;font-family:Arial;font-size:8.0pt'>To use this Web
 page interactively, you must have Microsoft® Internet Explorer 5.01 Service
 Pack 2 (SP2) or later and the Microsoft Office 2003 Web Components.</p>
 <p style='margin-top:100;font-family:Arial;font-size:8.0pt'>See the <a
 href="http://r.office.microsoft.com/r/rlidmsowcpub?clid=1033&p1=Excel">Microsoft
 Office Web site</a> for more information.</p>
</object></div>


<!----------------------------->
<!--END OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD-->
<!----------------------------->
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文