主题:自己常用的调用EXCEL对象方法
PROCEDURE CheckExcel
IF TYPE("Excel.name")="U"
release Excel
public Excel
TRY
Excel=GETOBJECT(,"Excel.application")
CATCH
try
Excel=CREATEOBJECT("Excel.application")
catch
messagebox("创建EXCEL对象失败")
endtry
ENDTRY
ENDIF
ENDPROC
IF TYPE("Excel.name")="U"
release Excel
public Excel
TRY
Excel=GETOBJECT(,"Excel.application")
CATCH
try
Excel=CREATEOBJECT("Excel.application")
catch
messagebox("创建EXCEL对象失败")
endtry
ENDTRY
ENDIF
ENDPROC