cancel
Showing results for 
Search instead for 
Did you mean: 

Spool Need to Convert to Excel file and send via Email

ilavarasan_td
Participant
0 Kudos

Hello All,


My Requirement is Spool need to convert in to excel file and send via email, like Z program or Define Job Wizard SM36 periodically.

1. When i am using z program for this , i am getting the out put of the spool in excel , those data are printing in the excel file in one cell, herewith i have attached the output.

But the requirement of the excel output is when we manually download the spool to excel one format will come. like that we required. is it possible to get the output like this ?

2. if i go for SM36, instead of Z program, can i get excel format like above ?

Could you please suggest ?

Regards
Prince

Accepted Solutions (1)

Accepted Solutions (1)

matt
Active Contributor

Using abap2xlsx and the function module RSPO_RETURN_ABAP_SPOOLJOB to read the spool, I developed a program that does exactly this.

The starting point is the function module which returns an internal table (use a line type of TXMISPOROW). You can then parse this using simple ABAP. For example, if you put a blank line for all ---------------------- lines on the spool, and replace all | with ; (or ,) you'll be able to download as a CSV. To download as xlsx, use abap2xlsx, or one of the other solutions available (search).

Answers (0)