| |
|
|
- 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... |
|
|
| 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 |
|
|
| |
|
|