Private myapp, rowIndex, colCount, colMax, fontNameSet, fontSizeSet, rowTitle
Wait Window "準備?Excel..." Nowait
LCOLDONERROR = On("ERROR")
On Error Do noExcel
tmpmyapp = Getobject('','excel.sheet')
On Error &LCOLDONERROR
If Type("tmpmyapp") != "O"
Return .F.
Endif
rowIndex = 0
myapp = tmpmyapp.Application
myapp.WorkBooks.Add()
myapp.Caption = "AAAAAAAAA"
oSheet = myapp.ActiveSheet
這段代碼裏面哪個地方可以判斷或加上判斷語句。想要的效果是裝了excel就導出excel,沒裝就出預覽報表。