Jump to content
We've recently updated our Privacy Statement, available here ×

Is there not the same function in XLSX format as XLS format export properties?


hongming8888

Recommended Posts

Hi everyone!

When creating Excel reports of XLS format with Jaspersoft Studio, we can control a wide variety of controls with Export properties like this article.

"Locking / protecting a cell or column in JasperSoft Studio"

https://community.jaspersoft.com/questions/852006/locking-protecting-cell-or-column-jaspersoft-studio

Those functions is very powerfull and wonderful for excel reports.

Can Jaspersoft Studio does the same thing in XLSX format?

Like those

net.sf.jasperreports.export.xlsx.password

net.sf.jasperreports.export.xlsx.cell.locked

 

Please someone suggest to me!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Thank Hozawa for your reply!

In my sample report, it works fine with XLS format, but does not work with XLSX format.

What's wrong below my report?

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Locked_Unlocked_Cell_Sample_Report" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b18969a8-f778-462b-959b-f934fe4c7419">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="CIPS-IT2"/>
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="net.sf.jasperreports.export.xls.password" value="password"/>
    <property name="net.sf.jasperreports.export.xlsx.password" value="password"/>
    <property name="com.jaspersoft.studio.report.description" value="Only specific items can be entered Form Excel format."/>
    <queryString>
        <![CDATA[sELECT 'A001' AS "Item1" FROM DUAL]]>
    </queryString>
    <field name="Item1" class="java.lang.String">
        <property name="com.jaspersoft.studio.field.label" value="Item1"/>
    </field>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="30" splitType="Stretch">
            <staticText>
                <reportElement mode="Opaque" x="0" y="0" width="550" height="30" backcolor="#53C7FC" uuid="e2ad14aa-2f03-480a-b34b-57704c51da24"/>
                <textElement textAlignment="Center">
                    <font fontName="SansSerif" size="14"/>
                </textElement>
                <text><![CDATA[About Locked/Unlocked Cell,  Excel Sample Report]]></text>
            </staticText>
        </band>
    </title>
    <detail>
        <band height="66" splitType="Stretch">
            <staticText>
                <reportElement x="0" y="0" width="100" height="30" uuid="86163db2-7c7c-4b7d-a8f9-01d9d22134e3"/>
                <textElement>
                    <font fontName="SansSerif"/>
                </textElement>
                <text><![CDATA[item1]]></text>
            </staticText>
            <staticText>
                <reportElement x="0" y="30" width="100" height="30" uuid="ca7c0ea8-5076-4ba3-8018-7ace7b52ca29"/>
                <textElement>
                    <font fontName="SansSerif"/>
                </textElement>
                <text><![CDATA[item2]]></text>
            </staticText>
            <textField>
                <reportElement key="" x="100" y="0" width="450" height="30" forecolor="#FC0703" uuid="25a43960-ec90-4018-b1be-e588744f5bea">
                    <property name="net.sf.jasperreports.export.xls.cell.locked" value="false"/>
                </reportElement>
                <textElement>
                    <font fontName="SansSerif"/>
                </textElement>
                <textFieldExpression><![CDATA["Unlocked"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="100" y="30" width="450" height="30" uuid="6ec762ac-bf82-4606-a351-17d3c7188fab"/>
                <textElement>
                    <font fontName="SansSerif"/>
                </textElement>
                <textFieldExpression><![CDATA["Locked"]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...