‎2008 Mar 28 6:49 AM
I have used OLE objects to move data from internal table to XL file.
in this how to see what are all the parameters that can be set to this OLE object ?
eg.
To make the column heading bold , what parameter i have
to set to the method in that object ?
help regarding this .
‎2008 Mar 28 7:23 AM
Hi,
You use the OLE-specific include OLE2INCL in the ABAP program.
Procedure
To define the program data and OLE objects required, enter these statements in the declaration section of the ABAP program OLECLIENT:
report oleclient.
tables: kna1, brfckna1.
parameters: kunnr like kna1-kunnr default '1'.
Internal table customer_data with structure of BRFCKNA1
data: begin of customer_data occurs 0.
include structure brfckna1.
data: end of customer_data.
OLE-specific include file
include ole2incl. " OLE-specific include file
Define OLE objects of type OLE_OBJEKT
data: excel type ole2_object. " EXCEL object
data: books type ole2_object. " collection of books
data: book type ole2_object. " book
data: cell type ole2_object. " cell
Loop counter: Start value ---> 1st output line in EXCEL table
data: i type i value '4'.
To start EXCEL and initialize the OLE objects, create an object excel of class EXCEL.APPLICATION and call the necessary methods of OLE objects.
Below the declaration section, enter:
create object excel 'EXCEL.APPLICATION'.
call method of excel 'WORKBOOKS' = books.
call method of books 'ADD' = book.
with regards,
sowjanya
‎2008 Mar 28 8:22 AM
I would suggest you to use DOI for better performance. and also easy to use.
Check the below link for Office Integration using the Spreadsheet Interface
i_oi_spreadsheet.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf
Check the below Demo programs for information on DOI.
SAPRDEMO_ACTIVEX_INTEGRATION Demonstration of ActiveX document integration
SAPRDEMO_DOI_BDS Demonstration for Using BDS In Office Integration
SAPRDEMO_ESUITE_SPREADSHEET Demonstration for eSuite Spreadsheet Integration
SAPRDEMO_ESUITE_WORDPROCESSOR Demonstration Program for eSuite Word Processor Integration
SAPRDEMO_FORM_INTERFACE Demonstration for Form Interface
SAPRDEMO_MAILMERGE_INTERFACE Demonstration for Mail Merge Interface
SAPRDEMO_MS_DEMO Program SAPRDEMO_MS_DEMO
SAPRDEMO_PIVOTINTERFACE Demonstration for Spreadsheet Interface
SAPRDEMO_SPREADSHEET_INTERFACE Demonstration for Spreadsheet Interface
SAPRDEMO_TABLES_IN_EXCEL Demonstration for Spreadsheet Interface
SAPRDEMO_WORD_NOTEPAD Demonstration for Spreadsheet Interface
SAPRDEMODOCUMENTCONTAINER Demo for OLE container control
SAPRDEMODOCUMENTCONTAINER2 Demonstration for OLE Container Control (Optimized)
SAPRDEMOEXCELINTEGRATION Demo for Excel97 integration
SAPRDEMOEXCELINTEGRATION2 Demonstration for Excel 97 Integration (Optimized)
SAPRDEMOLOTUS123INTEGRATION Demo for Lotus 1-2-3 integration (from Release 9)
SAPRDEMOOFFICEINTEGRATION Demo for Office integration
SAPRDEMORTFPROCESSING Demo for RTF-based word processing using Desktop Office Integratio
SAPRDEMOVIEWING Demonstration for Viewing Interface
SAPRDEMOVISIO50INTEGRATION Demonstration for Visio 5.0 Integration
SAPRDEMOWORD97INTEGRATION Demonstration for Word97 integration
SAPRDEMOWORDPROINTEGRATION Demonstration of WordPro98 integration
Also check the below links for more information on Desktop Office Integration.
ABAP Object Oriented SpreadSheet with "Unlimited" Power
http://www.sap-img.com/abap/abap-object-oriented-spreadsheet-with-unlimited-power.htm
How to Create Pivot Table in Excel using Desktop Office Integration
http://www.sap-img.com/abap/how-to-create-pivot-table-in-excel-using-desktop-office-integration.htm
Hope this helps.
Thanks,
Balaji