‎2009 Dec 29 6:54 AM
Hi all,
I am getting an error excel file cannot be processed while using function TEXT_CONVERT_XLS_TO_SAP to upload an excel file.
Can anyone help me in resolving it.
Thanks in advance,
Neela
‎2009 Dec 29 7:01 AM
Hi,
Make sure that the excel is closed before upload. I hope you are using .xls file. If you are using office 2007 it saves the file as .xlsx by default. Convert this to 2003 format and upload.
Your subject and actual question are no where matching. Please use proper subject to get fast responces
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Dec 29, 2009 12:32 PM
‎2009 Dec 29 7:01 AM
Hi,
Make sure that the excel is closed before upload. I hope you are using .xls file. If you are using office 2007 it saves the file as .xlsx by default. Convert this to 2003 format and upload.
Your subject and actual question are no where matching. Please use proper subject to get fast responces
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Dec 29, 2009 12:32 PM
‎2009 Dec 29 7:04 AM
‎2009 Dec 29 8:26 AM
Hi,
Can you post the piece of code for upload? Are you getting any exceptions from FM or error message?
Thanks,
Vinod.
‎2009 Dec 29 9:10 AM
Hi,
Use the function module as shown below.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = l_file
i_begin_col = 1 "Begin of COLUMN
i_begin_row = 2 "Begin of ROW
i_end_col = 256 "End of COLUMN
i_end_row = 65536 "End of ROW
TABLES
intern = t_intern "Internal Table for Excel-Data
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
‎2009 Dec 29 9:07 AM
Maybe u can use this part of code;
DATA: lv_file TYPE rlgrap-filename value 'sample.xls'.
DATA: t_internal TYPE zalsmex_tabline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'Z_ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lv_file
i_begin_col = 1
i_begin_row = 3
i_end_col = 16
i_end_row = 65536
TABLES
intern = t_internal
* 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.
‎2009 Dec 31 5:46 AM