Skip to Content
avatar image
-2
Former Member

can we format excel sheet with header in colour in mail program and excel sheet as attachment

Hello freinds

I have an requirement , to send and email with attech excelsheet in formatted form also header in colour .Please suggest if its possible.I have made a program with only simple excel sheet is getting sent.

Thanks

Abhijeet

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 17, 2017 at 12:40 PM

    Yes it is possible, has been asked many times before. If you use ABAP2XLSX project it would be the easiest.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2017 at 03:57 PM

    Hello,

    If you are not allowed to install ABAP2XSLX you can also create a XML Excel compatible file from scratch.

    It looks like that :

    * Write on you file :
    <?xml version="1.0"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <Worksheet ss:Name="My Worksheet">
    <Table>
    * Now LOOP on your data and write :
    <Row>
    * For each field, point value with <field> and write in file :
    CONCATENATE '      <Cell>' '<Data ss:Type="String">' <field> '</Data>' '</Cell>' INTO l_line_to_export.
    * Close all opened tags

    That way you can also change color and fonts of each cell. You will find how to easily.

    Et voilà

    Bertrand

    Add comment
    10|10000 characters needed characters exceeded