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: 

i_oi_spreadsheet ( how to copy the sheet into table )

Former Member
0 Kudos

Hello Friends,

I am using the interface "i_oi_spreadsheet" to take the excel sheets into internal table. The interface has good methods such as, "get sheets" and "set sheet", but I do not find a way to copy a sheet into internal table ?

Can any one please let me know how I can copy the sheet, once I have active/select it ?

Regards,

6 REPLIES 6

Former Member
0 Kudos

use function module "ALSM_EXCEL_TO_INTERNAL_TABLE:"

it will work

0 Kudos

Hello,

This fm use only one sheet, I have various sheets in one excel file ....

Regards,

0 Kudos

Okay problem solved, thanks and regards,

0 Kudos

Hello Haider Zaidi,

Can you please explain how you were able to upload the information of a specific sheet into an internal table?

I am having a similar problem.

Your help would be much appreciated.

Thanks and Regards

Thyaga

0 Kudos

Dear Thyagaraja Yenketeramdoo,

Please refer the document Copying data from Microsoft Excel to ABAP using OLE and instead of the method 'ActiveSheet' use the method 'Sheets' passing your sheet name. Just do the follwing change to the document -

Comment -

**** Refering the active worksheet of the application
***  GET PROPERTY OF gv_application 'ActiveSheet' = gv_activesheet.


Add -

* Refering the active worksheet of the application
  GET PROPERTY OF gv_application 'Sheets' = gv_activesheet
    exporting
      #1 = 'Sheet2'.   " Here 'Sheet2' is the name of the sheet
     " that i want to open

  CALL METHOD OF gv_activesheet 'Select'.

Let the rest of the code be same. It will work fine.

Hope it helps. Thank you.

Regards,
kartik

0 Kudos

i_oi_spreadsheet

You can select the sheet you want to read with method select_sheet, with set_selection and insert_range you can indicate rows and columns,  and with method get_ranges_data select the data from selected sheet to an internal table (parameter contents).