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

Exception when using FM ALSM_EXCEL_TO_INTERNAL_TABLE

Former Member
0 Likes
497

Hi ABAP gurus,

I am using FM ALSM_EXCEL_TO_INTERNAL_TABLE, but there is an exception raised which is sy-subrc = 2 and it states UPLOAD_OLE in the FM.

In the FM code, when the control is on the second call method given below the exception is raised:

<i><b> CALL METHOD OF application 'Workbooks' = workbook.

m_message.

CALL METHOD OF workbook 'Open' EXPORTING #1 = filename.

m_message.</b></i>.

Could anyone throw some light on this.

Thanks in Advance.

Regards,

Venkat

Hi ABAP gurus,

I am using FM ALSM_EXCEL_TO_INTERNAL_TABLE, but there is an exception raised which is sy-subrc = 2 and it states UPLOAD_OLE in the FM.

In the FM code, when the control is on the second call method given below the exception is raised:

<i><b> CALL METHOD OF application 'Workbooks' = workbook.

m_message.

CALL METHOD OF workbook 'Open' EXPORTING #1 = filename.

m_message.</b></i>.

Could anyone throw some light on this.

Thanks in Advance.

Regards,

Venkat

1 REPLY 1
Read only

Former Member
0 Likes
321

HI,

parameters: p_file like rlgrap-filename.

data: it_rows type standard table of t_itab with header line.

data : v_index type i.

field-symbols : <fs>.

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

exporting

filename = p_file

i_begin_col = 1

i_begin_row = 4

i_end_col = 15

i_end_row = 65000

tables

intern = it_rows

exceptions

inconsistent_parameters = 1

upload_ole = 2

others = 3.

if not it_rows[] is initial.

sort it_rows by row col.

loop at it_rows.

move : it_rows-col to v_index.

assign component v_index of structure it_output to <fs>.

move : it_rows-value to <fs>.

at end of row.

append it_output.

clear it_output.

endat.

endloop.

endif.

Have a look at OSS Notes 129994 and 127666. Hope these notes give some inputs.

Thanks

Sudheer