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

Down load data from Excel sheet

Former Member
0 Likes
515

Hi ,

Can any one tell me the Function module name for downloading data from excel sheet into an internal table.

Note :The extension of the excel file is .XLS.

Please tell me the FM oter than ALSM_EXCEL_TO_INTERNAL_TABLE as this FM will not consider the blank cells.

Thanks in advance,

Swamy Mantha.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
492

Hi Swamy,

check this link,

<u>http://www.sapdevelopment.co.uk/file/file_upexcel.htm</u>

Kindly rewrd points if u find it useful

Thanks&Regards,

Ruthra

3 REPLIES 3
Read only

Former Member
0 Likes
493

Hi Swamy,

check this link,

<u>http://www.sapdevelopment.co.uk/file/file_upexcel.htm</u>

Kindly rewrd points if u find it useful

Thanks&Regards,

Ruthra

Read only

Former Member
0 Likes
492

try FM KCD_EXCEL_OLE_TO_INT_CONVERT

data itab type table of KCDE_cells with header line.

CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'

EXPORTING

filename = 'C:\test.xls'

i_begin_col = 1

i_begin_row = 1

i_end_col = 3

i_end_row = 3

tables

intern = itab

EXCEPTIONS

INCONSISTENT_PARAMETERS = 1

UPLOAD_OLE = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

loop at itab.

write 😕 itab-row, itab-col, itab-value.

endloop.

rgds,

PJ

Read only

Former Member
0 Likes
492

HI,

Try this it works fine,

only thing you have to do is to take another internal table of your desired structure and move the data to it from internal table which is been populated by this FM.

DATA: ITEM TYPE STANDARD TABLE OF ALSMEX_TABLINE WITH HEADER LINE.

CALL FUNCTION 'Z_INS_EXCEL_TO_ITAB'

EXPORTING

filename = 'C:\FILE13.XLS'

i_begin_col = 1

i_begin_row = 1

i_end_col = 4

i_end_row = 4

tables

intern = ITEM

EXCEPTIONS

INCONSISTENT_PARAMETERS = 1

UPLOAD_OLE = 2

OTHERS = 3

.

thanks and regards,

manohar

Message was edited by: Manoharsairam Kavuri