Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=7389546 By: amramajeed
Hello, I'm having a problem in the column sorting when exporting to excel. When i sort a column in the page (by clicking on the header) , it sorts correctly, but when i export, the next column is sorted in the excel instead of the one i sorted. Ex: given the following columns No. Customer Code Customer Name Bill Amount If i click on the No. column (first column) the table is sorted by that column, but when i export to excel the sheet is sorted by the Customer Code column (second column). Why is the sorting shifted one column to the right when i export ??? Here is the code <display:table name="sessionScope.corporateBatchSmsCustomers" excludedParams="*" sort="list" class="listTable" id="record" requestURI="/actionManagement/corporateBatchSms.do" export="true"> <%com.itworx.rsk.collection.datamodel.sql.CorporateBatchSms customer = ((com.itworx.rsk.collection.datamodel.sql.CorporateBatchSms) pageContext .getAttribute("record"));%> <display:setProperty name="export.pdf" value="false" /> <display:setProperty name="export.csv" value="false" /> <display:setProperty name="export.xml" value="false" /> <display:setProperty name="export.selectableexcel" value="false" /> <display:setProperty name="export.rtf" value="false" /> <display:setProperty name="export.excel.filename" value="Corporate_Batch_SMS.xls" /> <display:column media="html" title="<%= checkAllInputTemp %>"> <html:checkbox property="selectedCustomers" value='<%=""+customer.getCustomerId()%>' title="checkerAll" onclick="checkAllChecked('checkerAll','selectedCustomers','checkerAll' )"></html:checkbox> </display:column> <display:column media="html" title='<%= DisplayerFormatter.formatTitleStyle("No.") %>'>${record_rowNum}</display:column> <display:column style="width:300px;" sortable="true" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Customer Code") %>' property="customerCode" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Customer Name") %>' property="customerName" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Due Amount") %>' property="amountDue" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Bill Amount") %>' property="billAmount" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Bill Cycle") %>' property="billCycle" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Customer Segment") %>' property="customerSegment" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Price Group") %>' property="priceGroup" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("PTP Active") %>' property="ptpActive" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Color") %>' property="color" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Hotline Removed") %>' property="hotlineRemoved" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Contacts Count") %>' property="mobileNumbersCount" sortable="true" headerClass="sortable"> </display:column> <display:column style="width:300px;" media="html" title='<%= DisplayerFormatter.formatTitleStyle("Agent Name") %>' property="agentName" sortable="true" headerClass="sortable"> </display:column> <display:column media="excel" title="No." sortable="true">${record_rowNum}</display:column> <display:column style="width:300px;" media="excel" title="Customer Code" property="customerCode" > </display:column> <display:column style="width:300px;" media="excel" title="Customer Name" property="customerName" > </display:column> <display:column style="width:300px;" media="excel" title="Due Amount" property="amountDue" > </display:column> <display:column style="width:300px;" media="excel" title="Bill Amount" property="billAmount" > </display:column> <display:column style="width:300px;" media="excel" title="Bill Cycle" property="billCycle" > </display:column> <display:column style="width:300px;" media="excel" title="Customer Segment" property="customerSegment" > </display:column> <display:column style="width:300px;" media="excel" title="Price Group" property="priceGroup" > </display:column> <display:column style="width:300px;" media="excel" title="PTP Active" property="ptpActive" > </display:column> <display:column style="width:300px;" media="excel" title="Color" property="color" > </display:column> <display:column style="width:300px;" media="excel" title="Hotline Removed" property="hotlineRemoved" > </display:column> <display:column style="width:300px;" media="excel" title="Contacts Count" property="mobileNumbersCount" > </display:column> <display:column style="width:300px;" media="excel" title="Agent Name" property="agentName" > </display:column> </display:table> ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=249318 ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user