Reputation: 51
When I use birt api to export excel, the excel's sheet name is default set to Sheet0
. Is there a way to custom sheet name in birt API?
Upvotes: 4
Views: 1916
Reputation: 1525
Can add Dynamic/Static Worksheet name.
Select Table, click in Script (onPrepare), use below line of code.
reportContext.getDesignHandle().setProperty("title", "Sheetname1");
Sheet name can also be passed through request parameter (workSheetName) using below line of code.
reportContext.getDesignHandle().setProperty("title", params["workSheetName"].value);
Upvotes: 1
Reputation: 31
I had a report with two table and page break after the first one so each table made their own sheet. after selecting each table go to the script and in the "on create" script, code this:
this.name = "Sheet Name";
Upvotes: 3
Reputation: 20132
In the "Property Editor - Report" in the tab "General" you can enter a "Title".
This value will be taken to name the sheet when exporting to excel.
Upvotes: 2