Application Development 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: 

Code to dowload excel .xslx format

Former Member
0 Kudos

Hi gourou,

We use some function to dowload in xls format but didn't work in .xlsx format (convert error).

Can you provide me a function or method we can use it to download excel in .xslx format.

Thanks a lot

Soufiene

2 REPLIES 2

madhu_vadlamani
Active Contributor
0 Kudos

Hi Soufiene,

Please check with CL_GUI_FRONTEND_SERVICES and file_copy,FILE_COPY.Just go through this wiki also.

[Abap To Xlsx|http://wiki.sdn.sap.com/wiki/display/ABAP/abap2xlsx]

Regards,

Madhu.

0 Kudos

hi

Use this code it will helps u.........

*DOWNLOAD THE ITAB DATA

if not it is initial.

data: l_filename type string,

l_path type string,

l_fullpath type string,

l_result type i.

  • Display save dialog window

call method cl_gui_frontend_services=>file_save_dialog

exporting

window_title = 'FILE PATH'

default_extension = 'XLS'

default_file_name = 'CREDIT LIMIT DATA'

  • INITIAL_DIRECTORY = 'c:\temp\'

changing

filename = l_filename

path = l_path

fullpath = l_fullpath

user_action = l_result.

  • Check user did not cancel request

check l_result eq '0'.

call function 'GUI_DOWNLOAD'

exporting

  • BIN_FILESIZE =

filename = l_fullpath

filetype = 'ASC'

write_field_separator = 'X'

tables

data_tab = it_crdt_limit

endif.

endif.

<begging removed by moderator>

Thanks

Gupta

Edited by: Thomas Zloch on Nov 24, 2011 4:07 PM