12-09-2011 11:21 AM
Hi,
I got a requirement to add extra sheets and to download all the internal table values into 4 different sheet in Excel.
Created Excel and first internal table value got downloaded to Sheet1 .
remaining 3 internal values i populated by creating 3 different sheets in same workbook.
the above 3 got created infront of sheet1.
now i have to delete the existing sheets 2 and 3 ( default sheets )
even i added and checked CALL METHOD OF iv_sheet 'Delete'. after that also its not getting deleted.
please guide me in this.
Regards,
Priya.
12-09-2011 12:55 PM
Hi,
Have you disable the confirmation prompt by setting the property 'DisplayAlerts' of your application object to false?
It may be the cause of your issue...
set property of lo_appl 'DisplayAlerts' = 0.
call method of lo_sheet 'Delete'.
Kr,
Manu.
12-09-2011 12:55 PM
Hi,
Have you disable the confirmation prompt by setting the property 'DisplayAlerts' of your application object to false?
It may be the cause of your issue...
set property of lo_appl 'DisplayAlerts' = 0.
call method of lo_sheet 'Delete'.
Kr,
Manu.
12-12-2011 5:02 AM
Hi Manu,
Thanks a lot for your reply.
Its working now.
CALL METHOD OF h_excel 'Worksheets' = iv_sheet
EXPORTING
#1 = 2.
WHILE sy-subrc = 0.
SET PROPERTY OF h_excel'DisplayAlerts' = 0.
CALL METHOD OF iv_sheet 'Delete'.
SET PROPERTY OF h_excel 'DisplayAlerts' = 1.
CALL METHOD OF h_excel 'Worksheets' = iv_sheet
EXPORTING
#1 = 2.
ENDWHILE.