Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

activate specific sheet in excel?

Former Member
0 Likes
834

Good Day to ALL!

I patterned my program in RSDEMO1(Download to Excel)and it goes well except the active Excel sheet is "Sheet1" by default)

The requirement is when my data reaches 11 records, i want it to write in "Sheet2"?

How can i activate the next sheet?

How can i go back to previous sheet?

Any sample codes can help...

THANKS...

2 REPLIES 2
Read only

Former Member
0 Likes
663

Refer this:

Regards,

Subramanian V.

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
663

Hi Evan

If you are using SAP DOI (Desktop Office Integration) you can use the method John mentioned at the thread pointed by Subramanian.

If you are using pure OLE, you can use this:


FORM activate_sheet USING ip_sheet .
  CALL METHOD OF gs_excel 'Worksheets' = gs_actsheet
       EXPORTING #1 = ip_sheet .
  CALL METHOD OF gs_actsheet 'Activate' .
ENDFORM .

Hope this helps...

*--Serdar