| |
|
|
- page 1 - |
|
Detlef Jagolski | allô!!! j'ai folgendes Problem:
je voudrais aus einer Excel-Dossier qui Namen qui Tabellen auslesen et dans einem Kombinationsfeld insérer!
avec VB6 ca va so: KompilierenMarqueSéparation |
|
|
|
|
« cette Beitrag wurde comme Solution gekennzeichnet. » |
|
Detlef Jagolski | merci IF KompilierenMarqueSéparation $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
Salut
Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 04.11.2010 ▲ |
|
|
|
|
|
| Such la fois pour Excel, je mon là wirst fündig. |
|
|
| |
|
|
|
Detlef Jagolski | merci IF KompilierenMarqueSéparation $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
Salut
Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 04.11.2010 ▲ |
|
|
|