Q

Using OLE

I am trying to use ole to read excel spreadsheet into my abap program. I have downloaded a sample program which keeps crashing on me. I do not know how to resolve the issue because I do not understand the ole concept.

Can you give me a brief explanation of how this works and a sample working code if possible?


OLE is notoriously difficult to use. You need to determine the VBA commands on the Excel side, to achieve what you want to do. Once you have determined these, you can then write the ABAP to do it, using the CREATE OBJECT, CALL METHOD and SET/GET PROPERTY OF etc. keywords. The sample code provided by SAP, RSOLETT1, is very good - and it does work, provided you have your enviroment correctly set up - you might need to speak to your basis team about this.

One of the easiest ways to use OLE, is to write a VBA macro in Excel for your task, and call that from SAP.

A simpler solution might be to save your spreadsheet as a tab delimited flat file. Then you can use WS_UPLOAD function module, or READ DATASET to read the values into your program.


This was first published in July 2001

Dig deeper on SAP ABAP

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close