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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:29:58+00:00 2026-06-04T19:29:58+00:00

We are using the Display tag library in our Java based web application. Apart

  • 0

We are using the Display tag library in our Java based web application.

Apart from just using display tag library to show lists, we are also using it to export data to excel sheets which is working fine.

The problem is that the data is wrapped up in the Excel sheet columns.

I need to click on the cell to expand the cell to see the complete data.

Is there any way to prevent this wrapping up of data?
Can Excel sheet cells adjust themselves to the width of the data in it?

  • 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-06-04T19:30:01+00:00Added an answer on June 4, 2026 at 7:30 pm

    Yes cells can be autoformated, if you are using POI with it HSSF to create you document.
    If not I’m suggesting you to use it just open an existing document and auto resize columns you need.

    After you created all your cells but before saving document you just call this method that re-size column.
    for example i did it for all of my columns on a sheet like that:

    //
    // Create an instance of workbook and sheet
    //
    HSSFWorkbook workbook = new HSSFWorkbook();
    HSSFSheet sheet = workbook.createSheet();
    sheet.setAutobreaks(true);
     .
     .//code in which you create actual rows and cells HERE  
     .
    //auto formating to fit the page
    for(int i=0; i<repModel.getReportHeaders().length;i++){
    sheet.autoSizeColumn((short) (i+1));     
    }
    

    And here is a best link to use to start up with poi: Busy Developers’ Guide to HSSF and XSSF Features

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

Sidebar

Related Questions

Twitter seems to be using an <i/> tag to display their icons from a
I am actually using h:selectOneRadio to display items, given to it from f:selectItems tag.
We use the Display Tag Library to display grid data in our JSP's. We
I would like to display a tag cloud in my test application using a
I am using the java displaytag library. I need to show the headers in
I using display tag for my application. to render the table in some format
I am using display tag to render tables in my application. When I click
I am using display tag to show user list on my JSP. I have
I'm using the <pre> tag to display preformatted text (including line breaks, spaces and
I am using display tag in portals(Struts Portal Framework) deployed in websphere portal, using

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.