Skip to Content

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


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.



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Mar 12 at 08:50 AM

    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
    Add a comment
    10|10000 characters needed characters exceeded

    • 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).



  • Posted on Mar 12 at 07:02 AM


    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



    Add a comment
    10|10000 characters needed characters exceeded

    • 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.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.