SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Смена ориентации листа EXCEL



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> OLE2, Excel, WinWord
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Mon Oct 15, 2007 7:21 pm    Post subject: Смена ориентации листа EXCEL Reply with quote

Code:

*Author РМщик
REPORT Z_LIST_Orientation.

INCLUDE OLE2INCL.
DATA: SSS(20).

START-OF-SELECTION.

PERFORM EXC.

*&--------------------------------------------------------------------*
*& Form EXC
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM EXC.
DATA: H_EXCEL TYPE OLE2_OBJECT,
H_MAPL TYPE OLE2_OBJECT,
H_SHEET TYPE OLE2_OBJECT,
H_ZL TYPE OLE2_OBJECT,
H_F TYPE OLE2_OBJECT,
H_P TYPE OLE2_OBJECT.

CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
SET PROPERTY OF H_EXCEL 'Visible' = 0.
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_MAPL 'Add'.
CALL METHOD OF H_EXCEL 'Worksheets' = H_SHEET
EXPORTING
#1 = 'Лист1'.
CALL METHOD OF H_SHEET 'Activate'.
CALL METHOD OF H_EXCEL 'ActiveSheet' = H_F.
CALL METHOD OF H_F 'PageSetup' = H_P.
SET PROPERTY OF H_P 'Orientation' = 2.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_SHEET 'RANGE' = H_ZL
EXPORTING
#1 = 'A1'.
SET PROPERTY OF H_ZL 'Value' = 'Пример'.
CALL METHOD OF H_F 'PrintPreview'.
SET PROPERTY OF H_EXCEL 'Visible' = 1.

FREE OBJECT H_EXCEL.
FREE OBJECT H_ZL.
FREE OBJECT H_F.
FREE OBJECT H_MAPL.
FREE OBJECT H_SHEET.

ENDFORM. "VEXCEL
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> OLE2, Excel, WinWord All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.