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 655231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:34:52+00:00 2026-05-13T22:34:52+00:00

I export an Excel document with DisplayTag. It saves as a .xls file to

  • 0

I export an Excel document with DisplayTag. It saves as a .xls file to my Desktop. When I open it with Excel, this error displays:

“The file you are trying to open, ‘filename.xls’, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file.”

If I click “Yes”, it displays just fine in Excel. If I open this with Textpad, I see that it’s a binary file, but it appears to just be “.” delimited strings.

Any ideas what I might have done wrong, or how next to debug this?

edit::

If I change the extension to .txt, it’s not a binary file; it’s simply a list of delimited strings.

  • 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-13T22:34:53+00:00Added an answer on May 13, 2026 at 10:34 pm

    The default export class for Excel was set to the CSV class, but giving it the .xls extension. Changing displaytag.properties was the key here, something like:

    export.types=csv excel xml rtf pdf 
    export.excel=true
    export.xml=true
    export.csv=true
    export.rtf=false
    export.pdf=false
    export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
    export.pdf.class=org.displaytag.export.DefaultPdfExportView
    export.rtf.class=org.displaytag.export.DefaultRtfExportView
    export.excel.filename=data.xls
    export.pdf.filename=data.pdf
    export.xml.filename=data.xml
    export.csv.filename=data.csv
    export.rtf.filename=data.rtf
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In IE, when user uses Export To Excel (downloading .xls file) functionality in my
Any ideas to export Excel file or Google Document from Android Please i need
I am trying export the excel content into a word document using a template.
this is in the apache POI export Excel document ,I Don't know this sentence
I'm trying to export an Excel database into .txt (Tab Delimited), but some of
I'm using radgrid to export to excel file. Everything is ok except one thing.
When i open the export below in excel, all i can see for MemberOf
I am trying to get a document from Excel or OpenOffice that contains UTF
After using WebResponse to export excel then clicking a Link gives Page expired error.
I would like to export an HTML table to a MS Excel document (and

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.