程序中定义了XL:Variant;
编译到XL:=CreateOleObject('Excel.Application')时,识别不了CreateOleObject
请问是哪里漏了什么东西了吗?

解决方案 »

  1.   

    uses ComObj;因为在它的帮助中,就有这一条:
    nstantiates a single instance of an Automation object.UnitComObj  {帮助中说明了这个函数属于哪个单元}CategoryCOM utilitiesfunction CreateOleObject(const ClassName: string): IDispatch;Description
      

  2.   

    再uses EXCEL97 or EXCEL2000
      

  3.   

    uses excel97和excel2000有什么区别?
    我uses EXCEL97 ,可照样能打开excel2000。
      

  4.   

    在uses中加入:
    ComObj单元