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

Function module:EXCEL_OLE_STANDARD_DAT

Former Member
0 Likes
904

hi all,

In bdc download,while downloading the file using the function module :

EXCEL_OLE_STANDARD_DAT, zeros are appended in some of the columns of the first row in the excel sheet.

can anyone please help me out in this issue so that i do not get those zeros appended in the first row.

Thanks in advance,

Regards,

Thasneem

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
743

hi Fathima,

Check whether you are passing the parameters in this fashion only to the FM ...

CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
     EXPORTING
          FILE_NAME                 = 'C:USR03.XLS'
          DATA_SHEET_NAME           = 'USER LIST'
    TABLES
         DATA_TAB                  =  ITABUSR03
         FIELDNAMES                =  FLDITAB
 
    EXCEPTIONS
         FILE_NOT_EXIST            = 1
         FILENAME_EXPECTED         = 2
         COMMUNICATION_ERROR       = 3
         OLE_OBJECT_METHOD_ERROR   = 4
         OLE_OBJECT_PROPERTY_ERROR = 5
         INVALID_FILENAME          = 6
         INVALID_PIVOT_FIELDS      = 7
         DOWNLOAD_PROBLEM          = 8
         OTHERS                    = 9.
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
744

hi Fathima,

Check whether you are passing the parameters in this fashion only to the FM ...

CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
     EXPORTING
          FILE_NAME                 = 'C:USR03.XLS'
          DATA_SHEET_NAME           = 'USER LIST'
    TABLES
         DATA_TAB                  =  ITABUSR03
         FIELDNAMES                =  FLDITAB
 
    EXCEPTIONS
         FILE_NOT_EXIST            = 1
         FILENAME_EXPECTED         = 2
         COMMUNICATION_ERROR       = 3
         OLE_OBJECT_METHOD_ERROR   = 4
         OLE_OBJECT_PROPERTY_ERROR = 5
         INVALID_FILENAME          = 6
         INVALID_PIVOT_FIELDS      = 7
         DOWNLOAD_PROBLEM          = 8
         OTHERS                    = 9.
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Read only

0 Likes
743

Thank you Santosh.

i have tried the way you have told but still those zeros are appended.

Read only

0 Likes
743

Fathima,

Just carefully check you excel file and remove all strange formatting, headers, invisible signs etc, just clean it up. It is very often helpful when you are doing data transfer from excel files.

Regards,

Marcin

Read only

0 Likes
743

hi Marcin,

I am downloading my data into an excel file.So, my output is an excel sheet . In my output i get those zeros in the first row in few columns.

Thanks in advance.

Regards,

Thasneem

Read only

0 Likes
743

Fathima,

I have checked this FM in testing mode - it sets up always first row as a header if column names are specified, if not this row will be empty - actually it is working fine for me. Can you paste here content of both internal tables that you are passing to FM (data and column names) and also result from excel file?

Regards,

Marcin