Posted: Mon Oct 15, 2007 7:21 pm Post subject: Смена ориентации листа EXCEL
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.
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.