English
Source / code snippets

Reading Excel names Ocx tables

 
Detlef Jagolski (04.11.10)

CompileMarkSeparation
 $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

Greeting

Detlef
 
11/04/10  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.088 Views

Untitledvor 0 min.
kustg05/14/19
Andre Rohland02/03/18
RudiB.11/19/15
Frank Vorholzer05/18/14
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie