Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 785555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:53:53+00:00 2026-05-14T20:53:53+00:00

When I export the content of the display tag table I use the data

  • 0

When I export the content of the display tag table I use the data shows up fine, but the header cells are surrounded by html span tags, which is slightly annoying.

I can imagine why Displaytag uses spans around the column header’s text, but it shouldn’t transpose in the exported data I think.

Here is my displaytag.properties config related to export:

# Export
export.amount = list
export.decorated = true
export.banner=<div id="exportTypes"><span class="label">Export: </span>{0}</div>
export.banner.sepchar=&nbsp;|
export.types=excel csv xml
export.excel=true
export.csv=true
export.xml=false
export.excel.label=xls
export.csv.label=csv
export.xml.label=xml
export.excel.filename=export.xls
export.csv.filename=export.csv
export.xml.filename=export.xml
export.excel.include_header=true
export.csv.include_header=true
export.xml.include_header=true

Here is the displaytag table itself:

<display:table
   class="list sortable"
   defaultsort="1"
   export="true"
   htmlId="contacts"
   id="row" 
   name="contacts" 
   requestURI="">

   <display:setProperty name="export.banner"><div id="exportTypes"><span class="label">Export:</span> {0}</div></display:setProperty>
   <display:setProperty name="export.csv.filename">CSV</display:setProperty>
   <display:setProperty name="export.excel.filename">XLS</display:setProperty>
   <display:setProperty name="basic.msg.empty_list_row">
    <tr class="empty">
     <td colspan="7">Empty</td>
    </tr>
   </display:setProperty>

   <display:column class="lastName" property="lastName" sortProperty="lastName" headerClass="lastName first" sortable="true" titleKey="Lastname" href="contact/view" paramId="contactId" paramProperty="id" />
   <display:column property="firstName" class="firstName" headerClass="firstName" sortable="true" titleKey="FirstName" />
   <display:column class="loginName" headerClass="loginName" sortable="true" titleKey="Username" />
</display:table>

My problem is when I click export on either the CSV or the XLS format the header row in the generated file looks like this:

<span>Last Name</span> <span>First Name</span> <span>Username</span>

I really don’t want those span tags in there, any way to work around that?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:53:54+00:00Added an answer on May 14, 2026 at 8:53 pm

    Found the problem, this was due to us using a string from the message.properties containing offending text in the titlekey field.
    However removing the span tags from the text in the message.properties file turns out to remove the sorting arrow on the columns in the web page… so that’s still not perfect of a solution. 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.