Application Development 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: 

method to change the active sheet in the excel sheet

Former Member
0 Kudos
901

Hi,

Please let me know any method which helps to change the active sheets in the excel file.

I have a requirement to read data from multiple sheets in a file. I have done the same but performance is good, So i have an alternate idea.
so if you know any method which helps to change the active sheets in excel please help.

thanks,

muthu

1 REPLY 1

Former Member
0 Kudos
248

Hi Muthu ,

As per your requirement of reading data from Multiple Sheets there are two methods:

1) Using OLE Object method - advantage of using this is that we can control all excel functionality ,but disadvantage is that it requires too much of coding effort and have to write code for each excel cells.

I will not recommend this method .

2) Using OOPS Method : there are standard class method using which we can read data from multiple sheets , I will recommend this method as I have used the same method and got good performance. Also same method is used in standard  applications.

Use class: CL_FDT_XL_SPreadsheet - create its instance LREF_EXCEL

Use Function  Module GUI_UPLOAD to upload the excel file -> later use SCMS_BINARY_TO_XSTRING

Use LREF_EXCEL to get list of worksheet names

later loop at all sheets - use methods select_sheet  set_selection , insert_range get_ranges_data to read values into selection table..