My requirement is to export the report data from web viewer to xlsx format. But xlsx option is not coming at all in export dialog. I'm using jetty web server and birt runtime 4.2.2.
Below is the relevant piece of code in /root/pr/lib/birt-runtime-4_2_2/birt/webcontent/birt/pages/dialog/ExportReportDialogFragment.jsp (which I modified to view xlsx option as per another article in StackOverflow.com).
<%
<%-- String[] supportedFormats = ParameterAccessor.supportedFormats; --%>
String[] supportedFormats = {"pdf","xls","xlsx"};
%>
<TABLE CELLSPACING="2" CELLPADDING="2" CLASS="birtviewer_dialog_body">
<TR HEIGHT="5px"><TD></TD></TR>
<TR>
<TD>
<label for="exportFormat"><%=BirtResources.getMessage( "birt.viewer.dialog.export.format" )%></label>
<SELECT ID="exportFormat" NAME="format" CLASS="birtviewer_exportreport_dialog_select">
<%
ParameterAccessor.sortSupportedFormatsByDisplayName(supportedFormats);
for ( int i = 0; i < supportedFormats.length; i++ )
{
%>
<OPTION VALUE="<%= supportedFormats[i] %>"><%= ParameterAccessor.getOutputFormatLabel( supportedFormats[i] ) %></OPTION>
<%
}
%>
</SELECT>
</TD>
</TR>
And in /root/pr/lib/birt-runtime-4_2_2/birt/WEB-INF/viewer.properties, I've added below 2 lines at proper place.
viewer.extension.xlsx=xlsx, viewer.label.xlsx=XLSX
But still in web viewer the xlsx option is not coming. Could you please help me to find any way out ?