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: 

download the data on to application server in .XLS format

Former Member
0 Kudos

hello experts,

is it possible to download the data onto application server in .xls format..

if so... can anyone guide me how to do it plzzz, any sample code would be really appreciated.

its bit urgent

Thanks a lot for your anticipation

Nitesha

3 REPLIES 3

rodrigo_paisante3
Active Contributor
0 Kudos

Hi, try to search in the forum about "download xls format".

Some links result:

Regards.

RP

0 Kudos

Try this code

data: itab type string_table,
        WA TYPE STRING.

PARAMETERS: p_output(256) TYPE c DEFAULT '\applserverFINfin_ee.xls',

* POPULATE YOUR INTERNAL TABLE HERE

 OPEN DATASET p_output FOR OUTPUT IN LEGACY TEXT MODE.

IF sy-subrc EQ 0.
loop at itab into wa.
    TRANSFER wa TO p_output.
endloop.
endif.

former_member189059
Active Contributor
0 Kudos

Hello Nitesha,

Well, you can always write a text file onto the application server and rename it as a .xls file

But, it will not be excel formatted

If you want to get columns and rows in the file, then you can make a csv file which can be written to the application server with the 'open dataset' concept

the csv formatting has to be done manually

ie: insert commas between each value

You cannot write an excel file to the application server directly

One other workaround is to write the file to the presentation server as an excel file and then move it to the application server via the transaction CG3Z or the function 'C13Z_FRONT_END_TO_APPL'.