This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unncessary empty spaces in excel file exported from websphere server

 
Prasad Prasada
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.
 
Muthukrishnan Manoharan
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
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}
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64854
86
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
Marshal
Posts: 34422
347
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a servlet, not JSPs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic