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

How to read excel using DOI

Former Member
0 Likes
528

Hello experts,

I am trying to upload excel using Desktop Office Integration(DOI). Total no. of columns in excel is fixed but the no. of rows can vary at deifferent instance. Since the report can run in background as well, I cannot ask the user to enter total no. of records to be uploaded. I tried different method available in interface i_oi_spreadsheet but I am not able get the desired functionality.

Regards,

Amit

2 REPLIES 2
Read only

Former Member
0 Likes
468

Dear

If u just need to upload data from your desktop to your report this u can done by using

some FM

GUI_upload 
TEXT_CONVERT_XLS_TO_SAP

if this is your problem i think it would help .

Ankit

Read only

Former Member
0 Likes
468

Hi,

Use this function Module,

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

EXPORTING

i_line_header = 'X'

i_tab_raw_data = it_raw

i_filename = p_file

TABLES

i_tab_converted_data = it_sheader

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Rgds

siva