• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Unncessary empty spaces in excel file exported from websphere server  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to export some contents to an excel file, from a jsp file using websphere server. All the contents are getting exported successfully, as it is, but the the contents in the first cell has lot of empty spaces appended before it. I have set the Cache-Control to "no-transform". I am using websphere server. Please let me know if you know a solution to remove the unncessary spaces.
 
Ranch Hand
Posts: 91
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the API (like Apache POI) you are using to populate the data into Excel sheet..
 
Prasad Prasada
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not using any API(like Apache POI) to populate the data into excel sheet. I am just using Expression language to populate the contents of excel sheet.
 
author & internet detective
Sheriff
Posts: 38569
656
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prasad,
Welcome to JavaRanch!

Can you post the first couple lines of your JSP?
 
Prasad Prasada
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have only one line in the jsp, which writes the comma separated values using Expression Language.
The headers are set to appropriate values in java file.

Code in jsp: ${excelFile.csvtext}
 
Author and ninkuma
Marshal
Posts: 66806
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using a JSP to begin with? If you are constructing the CSV in the servlet, why bother with the JSP?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 38569
656
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Prasad Prasada wrote:Hi,

i have only one line in the jsp, which writes the comma separated values using Expression Language.
The headers are set to appropriate values in java file.

Code in jsp: ${excelFile.csvtext}


That's it? No imports or anything before it? And I agree with Bear - there's no need to put on EL statement in a JSP.
 
Prasad Prasada
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please let me know the alternative solution for this.
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a servlet, not JSPs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!