In one of our recent
development we had a requirement to add a custom button dashboard for ‘Export
Current Page To Excel’. We have option to export page to excel in Page Options
or Export Link.
To create button we need to
find ‘On Click’ event of this option. We can find properties of this link by
right clicking on ‘Excel 2007+’ and Inspect element.
Following are the steps to
create custom button,
1.
Edit Dashboard and add Text from dashboard
object list on the corresponding Section:
2.
Edit text and add the following HTML code :
<input
id="idDashboardExportToExcelMenu" binit="true"
role="menu" aria-activedescendant="popupMenuItem"
aria-haspopup="true" style="width:175px;height:30px ;
background-color: rgb(47, 95, 135); color: rgb(255, 255, 255); font-size:13px;
font-family: Arial,sans-serif;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
cursor:pointer;border-radius: 4px; display:block;
padding:4px;background-image:none; text-align:center;"
onclick="return saw.dashboard.exportToExcel('@{dashboard.path}', '@{dashboard.currentPage}', true);"
role="menuitem" value="Export Current Page"
type="button"/>
I have used Reserved System Variables provided by
OBIEE 11g.
We use '@{dashboard.path}' variable to
catch dashboard path and '@{dashboard.currentPage}' variable to capture current
page.
You can find list of all such Reserved system
variables on following link,
3.
Check the box “Contains HTML Markup” and save
the changes.
This solution will capture entire page in excel rather than
just single analysis.
How to do for csv?
ReplyDelete