Is there a way to set xcel output sheet name?

when you open the spreadsheet, its name is the sheet name.  I'd like to set the sheet name to the date of creation.

patricia.williams's picture
Joined: Mar 8 2015 - 7:57am
Last seen: 4 years 9 months ago

2 Answers:

Sheet name can be set type setting them in property "". Following page shows how to set it dynamically:

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago

That link hints that you can use to obtain that, but does not really explain how.

A little trial&error testing in Jasper Studio using a simple report with column header and detail band, revealed that JS was very picky about where to place it. I could only get it to work if I placed it inside a reportElement:

        <band height="14" splitType="Stretch">
                <reportElement x="0" y="0" width="70" height="14" uuid="e0777908-52d5-4c52-8fb3-fcb3c31633bb">
                    <property name="" value="pixel"/>
                    <property name="" value="pixel"/>
                    <propertyExpression name=""><![CDATA[$V{SheetDetail}]]></propertyExpression>
                <reportElement x="70" y="0" width="85" height="14" uuid="b0d57d3b-0c00-4eb2-a106-d845732c8015"/>

$V{SheetDetail} is just a variable I created to hold the name of the sheet. It could also be a field. 

Furthermore, it did not matter in which field i placed the "sheet name", so I just placed it in the first field.

lbor's picture
Joined: Feb 22 2017 - 12:23am
Last seen: 1 year 5 months ago