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

0

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-cel...

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!

hongming8888's picture
Joined: Feb 18 2016 - 5:03am
Last seen: 3 months 4 days ago

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>

hongming8888 - 6 months 2 weeks ago

1 Answer:

1

xls properties should be effective with xlsx too.

hozawa's picture
49003
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 months 1 week ago
Feedback
randomness