08-26-2009 12:00 PM
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.
08-26-2009 12:12 PM
Hello Anurita,
Before "SET PROPERTY OF" statement you just Loop at your internal table from where you are going to explore in excel.
and check for the entry using tabix, if it excedes 65k then again loop the SET PROPERTY OF.
Hope it will work,
Regards,
Sujeet