Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to read the uploaded xls file  RSS feed

 
Ajit Kulkarni
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to upload a xls template using commons-fileupload.jar and parse it further.
My Jsp code goes something like this:



I am able to get the FileItem for the xls file. But When I am doing something like this :

I am getting weird String containing japanese/chinese characters.

Can anybody help me with this please ?
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
xls files are not text files, and should not be treated as such. Don't use Readers for them, but stick to InputStreams instead. Use a library like Apache POI or JExcelAPI to read the contents.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!