This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

opening excel application in browser

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm trying to open the excel application in browser window using setContentType("application/vnd.ms-excel") and it works.But when i try to read an excel file from disk to browser, then excel applcation opens but its data (i.e. excel data) looks corrupted in browser window.the io stream i'm using for reading data is
new BufferedReader(new FileReader(filepath)).
please somebody help me about this problem as early as possible.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what your "corruption" of data means exactly but if you're like me, it means that the file isn't formatted correctly...instead of putting data in seperate columns, it would just stick everything in one column, delimiters and all.
I may be wrong, but I have a strong belief that it's not BufferReader's fault but it's Excel's fault for not properly interpreting the delimiters in the input file. Unfortuntely, I don't know how to fix this problem yet.
 
khurram mirza
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm khurram mirza.i solved my problem i was facing couple of days before.that is the excel data seems like garbage when opened in browser.the reason for that problem was that i was using wrong output stream (i.e PrintWriter object) for sending data to browser instead i should have used the ServletOutputStream obj for that purpose.it sends data in binary format to browser.
khurram mirza.
 
Joe Wolf
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does you data properly go into seperate columns? Mine won't.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic