2014 Feb 07 11:39 AM
Hi SAP Gurus,
My requirement is as follows,
I need to send formatted excel as attachment.
I have gone through many posts and found it is possible by using IF_IXML_ELEMENT
The program is working fine however I am facing issue in formatting a particular cell in the sheet.
Requirement screen shot is attached below,
(I want to color the particular cell as red abd wrap it)
Code Attached:
Regards,
Pavan.
Hi SAP Gurus,
My requirement is as follows,
I need to send formatted excel as attachment.
I have gone through many posts and found it is possible by using IF_IXML_ELEMENT
The program is working fine however I am facing issue in formatting a particular cell in the sheet.
Requirement screen shot is attached below,
(I want to color the particular cell as red abd wrap it)
Code Attached:
Regards,
Pavan.
2014 Feb 07 12:15 PM
For email, search for CL_BCS. For doing stuff with excel the easy way, search for ABAP2XLSX.
matt
2014 Feb 07 12:50 PM
Actually, ABAP2XLSX itself would be enough as there are many examples included, one of them being sending the excel file per e-mail
Best,
Bruno
2014 Feb 07 1:11 PM
But Pavan already have all that working (see included code and what he wrote).
He only needs to set "color" XML property of cell.
Pavan - see this example XML Excel:
<Styles>
<Style ss:ID="s23">
<Interior ss:Color="#800080" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="s24">
<Interior ss:Color="#0000FF" ss:Pattern="Solid"/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="3" x:FullColumns="1" x:FullRows="1">
<Row>
<Cell ss:StyleID="s23"><Data ss:Type="String">apple</Data></Cell>
</Row>
<Row>
<Cell ss:StyleID="s24"><Data ss:Type="String">orange</Data></Cell>
</Row>
</Table>
</Worksheet>
2014 Feb 07 1:58 PM
Hi,
Thanks for the reply,
CL_BCS is to send xls attachment as mail,
I want to send formatted xls.
Regards,
Pavan.
2014 Feb 07 2:00 PM
Hi,
Thanks for the reply,
Is ABAP2XLSX a program name?
My requirement is to send formatted xls.
Regards,
Pavan.
2014 Feb 07 2:05 PM
Hi Pavan,
abap2xlsx is a series of solutions regarding excel in abap, which consists in many objects, which you can install using SAPLINK.
You can find it here: abap2xlsx by ivanfemia
Even if you manage to solve your issue in some other way, I would recommend you to try this. It is very powerful and the demo's that are provided with it are coded perfectly and might help you in many other areas.
Best,
Bruno
2014 Feb 07 2:10 PM
CL_BCS is to send mail.
It can send unformatted data, formatted xls, jpegs, embedded content...
2014 Feb 07 2:11 PM
We understand your requirement - you don't have to keep repeating it. Have you search on the keywords you've been supplied with? Try using this site for search.
2014 Feb 07 3:34 PM
Why not suggest lmgtfy link with same query?
It also serves as a tutorial, a bit condescending though.
2014 Feb 25 12:01 AM
Hi Pawan,
Please take a look at this blog -
Using this approach , we can send the formatted output based on the Layout as an E-Mail attachment.
Include a field lt_s_color of type - lvc_t_scol in your output table. Update this field as follows.
ls_s_color-fname = fieldname
ls_s_color-color-col = col_negative.
ls_s_color-color-int = 0.
ls_s_color-color-inv = 0.
APPEND ls_s_color TO lt_s_color.
CLEAR ls_s_color.
Regards
Srini S
2014 Feb 25 3:08 AM
Hi Pavan,
I have encountered similar requirement before, and the approach was to use OLE approach on your issue.
To attach the file, I downloaded it to my desktop and then upload it again to attach to my email, then delete the downloaded file.
You can check on this link for more details. Thats just font color, but inside have several links to guide you with OLE.
2014 Dec 20 1:25 PM