• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Excel file - download

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I download some contents as an excel file using a servlet:


Now, the download excel sheet is not formatted properly. The columns do not get expanded to view the data.
Any reason why this happens? Or can we fix this column expansion via code?

This is a look and feel issue that I need to solve.

I appreciate any responses.
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code just streams an existing file. What you describe is a formatting issue inside the file - that's where it needs to get fixed. Servlets have nothing to do with it.
 
dwarakanathan thiru
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ulf,

So, how can this be fixed? Any other means other than letting the user do this work
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use one of the well-established XLS APIs (JExcelApi and Apache POI) to alter the file in any way you see fit before streaming it.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!