Exporting data from a editable <display:table>

I am using a combination of Spring, struts framework for a web based application. There is a need to display a editable display column. I have managed to achieve the same using the following code snippet.

<display:table name="pageScope.form.myList" class="displaytag" partialList="false" requestURI="./viewData" id="row"
                excludedParams="ajax" style="padding-left:20px; padding-top:10px;" export="true" >

<display:column property="id" title="Id" sortable="false" />
<display:column property="Name" title="Name" sortable="false" />

<display:column title=" Number" sortable="false" style="false">
    <html:text name="row" property="No" /> 
</display:column>

<display:column property="Code" title="Code" sortable="false" />

<display:column sortable="false" media="html" >
    <html:hidden name="row" property="Id"/>
</display:column>
<display:column sortable="false" media="html" >
    <html:hidden name="row" property="Name"/>
</display:column>
<display:column sortable="false" media="html" >
    <html:hidden name="row" property="Code"/>
</display:column>

The input variable is being accessed for data processing. This solution works fine.

Problem Statement: While using the export option the column “Number” exports the html tag embedded into it, meaning after export, in the excel the value for the column “Number” is displayed as <input type="text" name="No" value="545.5.6">. Snippet of data from the exported file is as displayed below

exported report

Is there anyways I can use the default export option with just the value and not the entire html tag being exported onto the report?


Source: jsp

Leave a Reply