【问题标题】:How to remove radio button while exporting to Excel using Display Tag?使用显示标签导出到 Excel 时如何删除单选按钮?
【发布时间】:2012-02-08 05:29:31
【问题描述】:

我想导出在 jsp 页面上使用 display 标记显示的表格。 但是当我导出它时,它会导出带有表格的单选按钮

下面是显示标签的sn-p

<display:table requestURI="CustListReportDetails.do" name="sessionScope.SESSION_CUST" id="formtable" pagesize="100" style="width:100%; border:0; cellspacing:0; cellpadding:10; align:center;" export="true">

    <display:table requestURI="CustListReportDetails.do" name="sessionScope.SESSION_CUST" id="formtable" pagesize="100" style="width:100%; border:0; cellspacing:0; cellpadding:10; align:center;" export="true">
    <display:column title="" style="width:10px">
        <input type="radio" name="recordIdentifier" value="${formtable.customerId}" onclick="javascript:setRoleCode('${formtable.customerId}');"/>
    </display:column>
    <display:column property="name" title="Name" /> 
    <display:column property="contactPerson" title="Contact Person" />              
    <display:column property="gender" title="Gender" /> 
    <display:column property="dob" title="Date Of Birth" /> 

    <display:setProperty name="export.excel.filename" value="Customer_reportExcel.xls"  />  
</display:table>

所需的 xsl 文件中不应有单选按钮。

【问题讨论】:

  • 我对同样的问题感到沮丧,所以我转向this dataTables plugin。它使用普通的 html 表格格式,并具有无穷无尽的功能。此外,它不会在排序、分页等时重新加载页面。试一试

标签: java jsp jakarta-ee struts


【解决方案1】:

问题解决了 在包含单选按钮的显示列标签中,我放置了媒体 =“html”,现在它不会在 Excel 工作表中导出单选按钮

上面的sn-p::里改代码了

display:column title="" style="width:10px" **media="html"**

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-23
    • 2023-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多