Eduard Lebedyuk · Nov 8, 2016

Why my ZEN report displays ok in xml mode but not xlsx excel

I have a following ZEN report:

Class ZENApp.Report Extends %ZEN.Report.reportPage

/// Class name of application this report belongs to.
Parameter APPLICATION = "ZENApp.SampleApp";

/// Specifies the default display mode used for this report if
/// the URL parameter, <var>$MODE</var>, is not present.
Parameter DEFAULTMODE As STRING  = "xlsx";

/// This XML defines the logical contents of this report.
XData ReportDefinition [ XMLNamespace = "" ]
<report xmlns=""
 sql="SELECT TOP 10 Name,DOB,Age FROM Sample.Person"
  <group name="Person">
   <attribute name="name" field="Name"/>
   <attribute name="dob" field="Dob"
   <attribute name="age" field="Age"/>

/// This XML defines the display for this report.
/// This is used to generate the XSLT stylesheets for both HTML and XSL-FO.
XData ReportDisplay [ XMLNamespace = "" ]
<report xmlns=""
   <table group="Person" excelSheetName="Persons"
    excelGroupName="Person" oldSummary="false">
    <item field="@name" excelName="$$$Name" />
    <item field="@dob" isExcelDate="true"
     excelName="$$$Date of Birth" />
    <item field="@age" isExcelNumber="true"


If I open it in xml mode in browser via this url:


I receive the following output:

<?xml version="1.0"  encoding='UTF-8'?>
    <Person name='Klein,Agnes E.' dob='31514.0' age='30'/>
    <Person name='Willeke,Imelda R.' dob='12429.0' age='82'/>
    <Person name='Vanzetti,Rhonda Y.' dob='35151.0' age='20'/>
    <Person name='Drabek,Samantha J.' dob='27023.0' age='42'/>
    <Person name='Waterman,Heloisa P.' dob='12195.0' age='83'/>
    <Person name='Koivu,Uma K.' dob='39816.0' age='7'/>
    <Person name='Rotterman,Wilma Z.' dob='34961.0' age='21'/>
    <Person name='Chadbourne,Brian D.' dob='24747.0' age='49'/>
    <Person name='Finn,Bob S.' dob='18627.0' age='65'/>
    <Person name='Adams,Chris Z.' dob='24424.0' age='49'/>

Yet, when I open it in default xlsx mode, browser starts downloading excel file. It's a valid excel file, but empty.

How do I get my report in xlsx format?

0 325
Discussion (2)0
Log in or sign up to continue