OWC控件的使用学习札记(一)

本文介绍了Office Web Components(OWC)的使用,特别是如何在.NET 1.1和OWC 10环境下创建饼状图和柱状图。这些控件提供了一种在浏览器中呈现Excel和Access类似功能的方式,虽然不包含全部功能,但支持读写Excel 2000的HTML格式,并能将数据导出到Excel进行进一步分析。
摘要由CSDN通过智能技术生成
     Office Web Components是一组的COM控件,设计的目的是为众多的控件容器提供交互的电子表格建模,数据报表和数据可视化功能。OWC库包含四个主要的组件:电子表格组件,图表组件,透视表组件和数据源组件。

  “Office Web Components”名称中的单词”Office”表示这些控件就是由那些开发微软Excel和Access的程序员中的一部分人开发的,并且这些控件被设计成在外观,使用感受和行为表现上就像是他们的微软Office兄弟的精简版一样。这些控件确实不包含Excel和Access中的所有的功能——换句话说,你也不会为了在浏览器中查看一个报表而动态的下载完整的Excel和Access,这些控件也确实包含了许多的常用功能,尤其是那些在与已有内容进行交互时所必需的功能。此外,这些控件还能够读写Excel 2000的HTML格式的文件,允许用户点击一个按钮,将当前的数据加载到Excel中,以便作更加强大的分析。

一、使用OWC生成饼状图和柱状图

代码在.net 1.1 和OWC 10下面测试通过。
XValue类似于"a\tb\tc\td\t"
YValue类似于"1\t3\t6\t2\t"

private void CreatChart()
{
    ChartSpaceClass csc = new ChartSpaceClass();
    //添加一个图表
    ChChart cch = csc.Charts.Add(0);
    csc.Border.Color="#7dd4fa";
    
    //OWC10.ChBorder chBorder=(OWC10.ChBorder)c
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. 收藏 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [COMException (0x80040154): Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154.] GraphPage.Page_Load(Object sender, EventArgs e) +1097 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 请大家帮忙 谢谢 Server Error in '/' Application. -------------------------------------------------------------------------------- Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值