‎2008 Nov 06 9:55 AM
Hi ,
I had one requirement to upload excel file.In the excel file that i upload there are some columns that is hided,so is it possible for the function module to retrieve the values from that hided columns.
Thanks,
Arun.
‎2008 Nov 06 10:23 AM
Hi,
try this....
*&---------------------------------------------------------------------*
*& Form get_excelint
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_excelint .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = infile
i_begin_col = '1'
i_begin_row = beg_row
i_end_col = '6'
i_end_row = end_row
TABLES
intern = excel_tab
* 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.
ENDFORM. " get_excelint
Arunima
‎2008 Nov 06 10:38 AM
‎2008 Nov 06 10:57 AM
Hi,
Check this FM...
TYPE-POOLS truxs.
DATA: it_type TYPE truxs_t_text_data.
* Uploading the data in the file into internal table
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_line_header = 'X'
i_tab_raw_data = it_type
i_filename = p_file
TABLES
i_tab_converted_data = ist_source[]
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
No need to give column no...