07-11-2011 12:45 PM
Hi,
I have been working on MIS projects wherein most of time i am dealing with excel files which users do need for reporting purpose but the problem my system have MS Office 2003 and files are in .XLSX format ( MS Office 2007 )
and i have downloaded needed patch for it and have tested successfully whether its opening MS Office 2007 files.
Now the requirement is there is file in .XLSX format on desktop i need to read that files into SAP and download at another path
lets say on C:/ and i am using GUI upload and download FM which is upoloading and downloading but downloaded files are opening though i have installed converter at my end. Kindly provide alterantive FM to input .XLSX file in SAP and download the same on Server
Thanks
07-11-2011 2:42 PM
Hello Parag,
To upload an excel file into an SAP program try using FM TEXT_CONVERT_XLS_TO_SAP.
To download an excel file to your local drive from SAP program try using FM SAP_CONVERT_TO_XLS_FORMAT.
Kind Regards,
Rae Ellen Woytowiez
07-12-2011 7:25 AM
Hello Parag,
Please check with below Function Modules to upload .XLSX file into SAP Program
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = '*.XLSX'
def_path = 'C:\'
mask = ',.XLSX,.*.'
mode = 's'
title = ''
IMPORTING
filename = w_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = w_file
i_begin_col = '1'
i_begin_row = '2' "we have a header row
i_end_col = '5'
i_end_row = '100'
TABLES
intern = it_import_table
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc NE space.
EXIT. " Drop out if there are issues
ENDIF.
To Download the .XLSX file:
If you have office '07 installed , it will automatically open similar to xlsx.
and you add the extension as .xlsx, i think it will be downloaded in that format only.
Regards,
Maheswari N
07-12-2011 7:32 AM
Hi Parag,
Have you tried ABAP2XLSX yet?, if not try the below link,
http://wiki.sdn.sap.com/wiki/display/ABAP/abap2xlsx
Regards,
Chen
09-30-2011 11:41 AM