• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

export data to excel and double byte

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read the postings about export data to excel.
I had this part done in English but when my data are in double byte, the data are not readable.
Anyone has any idea?
Thanks!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
June,
Are you using a comma/tab delimited file or an Excel library?
 
June
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,
All I did was getting the jsp page and view that page in excel. To do that, I just set content type to excel.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
June,
You are using what I consider a tab/comma separated file. The only thing I can think of is to make sure you set the proper encoding in the header.
 
June
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,
I set the content type to utf-8 for the jsp file already, but your suggestion confirms my thought that the header causes the problem too.
Will take a look at it again and may find out what was changed in the middle process.
Thanks
 
June
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I do response.setContentType("text/html; charset=UTF-8") before I filter the code to export to excel, it worked for double byte language but some single byte lang. don't work such as French.
My websphere server is on English machine and my applications can be viewed in different languages.
Anybody knows what is missing here?
Thanks!
 
June
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oops copy/paste wrong line, the setting should be:
response.setContentType("application/vnd.ms-excel; charset=UTF-8");
It looks like if I set utf-8, the double byte lang. work and single byte doesn't work. If I don't set uft-8, the single byte works and double byte lang. doesn't work.
I don't know what is going on here.
Please help.
Thanks
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic