Cbuilder用OLE操作Excel.docVIP

  • 5
  • 0
  • 约7.87千字
  • 约 6页
  • 2018-02-27 发布于河北
  • 举报
Cbuilder用OLE操作Excel

用OLE操?作Exce?l 要在应用程?序中控制E?xcel的?运行,首先必须在?编制自动化?客户程序时?包含Com?obj.hpp #inclu?de Comob?j.hpp C++ Build?er把Ex?cel自动?化对象的功?能包装在下?面的四个O?le Objec?t Class?函数中,应用人员可?以很方便地?进行调用。 设置对象属?性:void????????OlePr?opert?ySet(属性名,参数……); 获得对象属?性:Varia?nt?????OlePr?opert?yGet(属性名,参数……); 调用对象方?法:1) Varia?nt??OleFu?nctio?n(函数名,参数……); ?????????????2) void?????OlePr?ocedu?re(过程名,参数……); 在程序中可?以用宏定义?来节省时间?: #defin?e???PG???OlePr?opert?yGet #defin?e???PS???OlePr?opert?ySet #defin?e???FN???OleFu?nctio?n #defin?e???PR???OlePr?ocedu?re 举例: Excel?App.OlePr?opert?yGet(workb?ooks).OleFu?nctio?n(Add); 可写为 Excel?App.PG(workb?o

文档评论(0)

1亿VIP精品文档

相关文档