| |
|
|
| Detlef Jagolski (04.11.10)
KompilierenMarkierenSeparieren $H WINDOWS.PH
$H OCX3A.PH
$I OCX3A.INC
Declare x%, Sheets&, TabellenName$
Proc Tabellen_Namen
ocxInit()
VAR Datei1$ ="Test.xls"
VAR Excel& =ocxCreate("Excel.Application")
VAR Workbooks&=ocxGet(Excel&,"Workbooks")
VAR ExcelBook1&=ocxMethod(Workbooks&,"Open",Datei1$)
VAR Application&=ocxGet(ExcelBook1&,"Application")
VAR Worksheets&=ocxGet(Application&,"Worksheets")
VAR AnzahlTabellen&=ocxGet(Worksheets&,"Count")
x% = 1
VAR ActiveWorkbook&=ocxGet(Application&,"ActiveWorkbook")
WhileLoop AnzahlTabellen&
Sheets&=ocxGet(ActiveWorkbook&,"Sheets",x%)
TabellenName$=ocxGet(Sheets&,"Name")
Print TabellenName$
x% = x% + 1
EndWhile
ocxMethod(Excel&,"Quit")
ocxRelease(WorkBooks&,Excel&)
ocxDeInit()
EndProc
cls
Tabellen_Namen
waitinput
end
Saluto Detlef |
|
|
| |
|
|