English
Forum

Manueller Seitenumbruch by ocx in Exceltabelle insert

 
- Page 1 -



Stephan
Sonneborn
Hello together,

I try with folgendem code a Seitenumbruch in a Exceltabelle einzufügen:
'Excel invisible started:
Excel&      = ocxCREATE("Excel.Application")
Workbooks&  = ocxGet(Excel&,"Workbooks")
ExcelWnd&   = ocxGet(Excel&,"Hwnd")
ocxPut(Excel&,"DisplayAlerts",1)
ocxPut(Excel&,"Visible"      ,0)
'*-------------------------------------------------------------------------------------------------*
'Excel-Open File:
ExcelBook&  = ocxMethod(Workbooks&, "Open"  , File$)
ExcelSheet& = ocxGet(ExcelBook&,    "Sheets", ExcelSheet$)
'*-------------------------------------------------------------------------------------------------*
'Seitenumbrüche insert:
i& = 20 + 4*12

WHILENOT i& > aux%

    ocxPUT(ocxGET(ExcelSheet&, "Rows(" + STR$(i&) + ")"), "PageBreak", "xlPageBreakManual")
    i& = i& + 4*12

WEND


unfortunately works not.

BTW: knows someone Literatur about ocx with Excel?
i know never, when I a ocxGet, ocxPut or ocxMethod utilize must...

11 kB
Kurzbeschreibung: oxc-Error Message
Hochgeladen:03/12/11
Downloadcounter148
Download
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
03/12/11  
 



« this Posting watts as Solution marked. »


Stephan
Sonneborn
Heureka!
aux&=ocxget(Excelsheet&, "Rows", i&)
ocxput(aux&,"PageBreak", -4135)

The Variable xlPageBreakManual must as -4135 transfer go. then GEHTS!
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
03/13/11  
 




Stephan
Sonneborn
yet be I so far:
aux&=ocxget(Excelsheet&, "Rows", i&)
aux&=ocxget(aux&,"PageBreak")
ocxput(aux&,"xlPageBreakManual")

1. read The i&-th row one.
2. read The PageBreak-quality from
3. point xlPageBreakManual the PageBreak-quality To.
Result: crash...
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
03/13/11  
 




Stephan
Sonneborn
Heureka!
aux&=ocxget(Excelsheet&, "Rows", i&)
ocxput(aux&,"PageBreak", -4135)

The Variable xlPageBreakManual must as -4135 transfer go. then GEHTS!
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
03/13/11  
 




Uwe
''Pascal''
Niemeier
Hi Stephan!


i know never, when I a ocxGet, ocxPut or ocxMethod utilize must...


Kuckst You here: [...] 

PS: objectively could one The ocx-functions so strain, that not any more between modes and properties distinguished go must.
white but not, whether the really meaningfully ist; and faster go The functions therefore neither...


The Variable xlPageBreakManual must as -4135 transfer go. then GEHTS!


With the whom variables, The somewhere in the Objekt anchors are, must I with opportunity time pursue.
Perhaps can there what make.
by then recommend I - so How You it now made have - , The jeweiligen values (z.B. by Date) somewhere auszubuddeln and directly To transfer.

SeeYou
Pascal
 
03/15/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.059 Views

Themeninformationen



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