| |
|
|
- Página 1 - |
|
Detlef Jagolski | ¡Hola!!! Yo folgendes Problema:
Yo möchte de uno Excel-Expediente el Namen el Tabellen auslesen y una Kombinationsfeld einfügen!
Mit VB6 es así: KompilierenMarcaSeparación |
|
|
|
|
« Dieser Contribución wurde como Solución gekennzeichnet. » |
|
Detlef Jagolski | Gracias IF KompilierenMarcaSeparación $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
Saludo
Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 04.11.2010 ▲ |
|
|
|
|
|
| Such veces después de Excel, Yo mi hay wirst fündig. |
|
|
| |
|
|
|
Detlef Jagolski | Gracias IF KompilierenMarcaSeparación $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
Saludo
Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 04.11.2010 ▲ |
|
|
|