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

How to attach excel with multiple sheets in Spool as an attachment?

Former Member
0 Kudos
1,281

Hi,

I searched many threads for my requirement, but didn't match.

After executing the report excel will be downloaded (with multiple sheets)

Note: I used OLE object to create an excel (with multiple sheets ).

Requirement is if the report is executed in background mode then the excel (with multi sheets) has to be attached in the spool, later user can download it.

Please guide me.

BR,

Mahesh.

5 REPLIES 5
Read only

venkateswaran_k
Active Contributor
0 Kudos
905

Hi

I am not sure if you can send a file to spool - as spool can accept only sap objects such as alv list outputs, smart form outputs etc..

However you can try with option fm - LIST_TO_SPOOL.

Else you can look for sending an email to the user with attachment

Regards,

Venkat

Read only

0 Kudos
905

Hi Venkat,

Thanks for your input.

FM - LIST_TO_SPOOL not exists in the system.

If we have to send an email, how can we capture the run time data of excel (with multi sheets) and attach in the mail.

Please let me know.

BR,

Mahesh

Read only

RaymondGiuseppi
Active Contributor
905

What do you mean by attaching to the spool, could you consider saving the Excel on Application Server file system (AL11) or sending it via mail to the user?

For XLSX in the background (no OLE2) Look for (or)

  • Recent Abap class to handle XLSX
  • Working with XML and ZIP to build XLSX yourself
  • Abap2XLSX
Read only

0 Kudos
905

Hi,

Thank you.

I tried to check the link (Abap2XLSX) but actual details in the link is not working.

It is fine if we can send thorough mail also ( Please let me know some more inputs on the same).

As Excel data has been prepared at run time (not from ALV output), How can we pass the data to FM ( which has been used for email).

BR,

Mahesh

Read only

Sandra_Rossi
Active Contributor
0 Kudos
905

OLE for Excel is a so bad option (slow, doesn't work in background). Use abap2xlsx instead (as already told 1000 times in the forum).