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: 

read lines from second sheet from an excel

Former Member
0 Kudos

i have an excel file with two tab sheets.

i use this code but it doesnt work correctly. actually it works but for the first tabsheet.

i want it for the second one only. please help. i wiil reward with points in helpfull answers.

call method of application 'Worksheets' = sheet

exporting

#1 = 2.

set property of sheet 'Name' = 'Timesheets'.

call method of sheet 'Activate'.

  • CALL METHOD OF gs_chart 'Location'

  • EXPORTING

  • #1 = 2

  • #2 = 'Timesheets'.

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

exporting

filename = p_file

i_begin_col = 1

i_begin_row = 7

i_end_col = 1

i_end_row = 60000

tables

intern = itemp

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.

clear w_itemp.

loop at itemp.

w_itemp = itemp.

at last.

w_lin = w_itemp-row.

endat.

endloop.

3 REPLIES 3

Former Member
0 Kudos

Hi See following link :

http://searchsap.techtarget.com/tip/1,289483,sid21_gci868246,00.html?FromTaxonomy=/pr/283958

Reward points if helpful.

Regards.

Srikanta Gope

Former Member
0 Kudos

hi,

call method of application 'Worksheets' = sheet

exporting

#1 = 2.

call method of sheet 'Activate'.

set property of sheet 'Name' = 'Timesheets'.

  • Call method should be before of the Set property

Regards

Sudheer

Former Member
0 Kudos

it's urgent. please give me a tip..