Excel output- Dyanamically change Sheet name

nassjs
edited February 11, 2022 in Analytics #1

i have report where having 2 gird and 2 tables. i wanted to export as excel each grid and Table has to go as seperate sheet in output. It is working as expected in Xlsx format but Sheet names are displaying as Sheet1, Sheet2, Sheet3,Sheet4. I wanted to display as Sheet1 as "Filter page", Sheet2 as "First page",Sheet 3 as "Metric "etc.
I am using BIRT 4.2.
My Application using default Emiiter. please help me.

Comments

  • The default XLSX emitter will automatically name the sheets Report, Report1, Report2, etc unless a Title is given in the General properties... then it uses that Title appending 1, 2, etc, to the end.

    A new page will get created for each new Group in a table. Ideally, the excel sheet name should come from this group's TOC but it doesn't automatically. You can change the name in BIRT using scripting in the onRender script.

    For example, You can add the following code in the onRender method of a row associated with the grouping in a table.
    reportContext.setPageVariable("pageLabel",row["PRODUCTLINE"] );

    As each group changes, a new worksheet is already created, but this time the sheet will pick up the new name.

    Warning No formatter is installed for the format ipb