Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: method to change the active sheet in the excel sheet

$
0
0

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..


Viewing all articles
Browse latest Browse all 10425

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>