Skip to Content
0
Former Member
Aug 26, 2009 at 11:00 AM

Download internal table to multiple sheets of an excel using OLE Object

15 Views

Hi,

In an internal tale there may be more than 1Lac records.

Users want to download 65K records in one Sheet of Excel and then further 65K in another sheet and so on.

In this way the number of worksheet is variable.

I am using the below statement to pass the Sheet number i.e. Sheet1, Sheet2, etc.

DATA : sheet type ole2_object,

fl_sheet_name type char10.

SET PROPERTY OF sheet 'Name' = fl_sheet_name.

By using the above statement I get SY-SUBRC as 2 and the record is not passed to Excel.

If I change the statement to SET PROPERTY OF sheet 'Name' = 'Sheet1'.

It works fine.

Is there any limitation that we cannot set the parameters of OLE object through a variable?

Please let me know.