Application Development and Automation 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: 
Read only

Generating Excel file

Former Member
0 Likes
899

Hi,

I have internal table with data, How we generate excel file with that data.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
737

Here is a quick and easy way.




report zrich_0001 .

data: imara type table of mara with header line.

start-of-selection.

  select * into table imara up to 100 rows
            from mara.


  call function 'WS_EXCEL'
       exporting
            filename = 'TEST.XLS'
       tables
            data     = imara.

Regards,

Rich Heilman

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
738

Here is a quick and easy way.




report zrich_0001 .

data: imara type table of mara with header line.

start-of-selection.

  select * into table imara up to 100 rows
            from mara.


  call function 'WS_EXCEL'
       exporting
            filename = 'TEST.XLS'
       tables
            data     = imara.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
737

Hi,

You can make use of FM 'EXCEL_OLE_STANDARD_DAT' to download the contents of an internal table to Excel. Get back for any clarifications,

Rgds,

Read only

0 Likes
737

Hi

U can even use 'MS_EXCEL_OLE_STANDARD_DAT'.

With Rgs

Read only

Former Member
0 Likes
737

WS_EXCEL is obsolete....

GUI_DOWNLOAD is another option

Read only

Former Member
0 Likes
737

Hi Kisu,

You can also use the FM : ' WS_DOWNLOAD ' to download to data from internal table to PC File.

Hope that helps you.

Regards,

Anjali

Read only

0 Likes
737

Hi Kisu,

Hope this helps:

http://www.sapdevelopment.co.uk/file/file_updownpop.htm

Regards,

Ville Leivo