Sending Report Output as email attachment (excel) using XML Bursting

Bursting Control File Content:

<?xml version=”1.0″ encoding=”UTF-8″?>
<xapi:requestset xmlns:xapi=”http://xmlns.oracle.com/oxp/xapi&#8221; type=”bursting”>
<xapi:request select=”/XX_TEST/LIST_G_1″>
<xapi:delivery>
<xapi:email id=”123″ server=”xxmail.xx.com” port=”25″ from=”abc@xyz.com” reply-to=”abc@xyz.com” >
<xapi:message id=”123″ to=”abc@xyz.com” cc=”abc@xyz.com”
attachment=”true” subject=”Subject Text”>
EMAIL Body goes here
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output=”file name of attachment” output-type=”excel” delivery=”123″>
<xapi:template type=”rtf” location=”xdo://XX.XX_TEST.en.00/?getSource=true”>
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>


Location can be found using below query:

SELECT ‘xdo://’
|| xtb.application_short_name
|| ‘.’
|| xtb.template_code
|| ‘.’
|| xtb.default_language
|| ‘.’
|| xtb.default_territory
FROM apps.xdo_templates_b xtb
WHERE xtb.template_code = ‘XX_TEST’;