This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Apache POI - Column having non-english characters e.g. Thai and cell empty, then skips the cell

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to read an excel file (.xlsx) using Apache POI. One of the column of the file has non-english characters in it e.g. บริษัท พัฒนา จำกัด (มหาชน)

If the cell is having any value, then POI reads the cell properly with correct non-english characters. But, if the cell is empty in that particular column, it reads the next cell for the current column name.

e.g. if the column4 is having special character type and IS NOT empty, then, POI maps column4 with value in that column properly. But, if the column4 is having special character type and IS empty, then, POI maps column4 with value in column5.

This corrupts the complete structure and cellIterator.

Please let me know what is the problem and how to solve it? Help will be appreciated.

Thanks!
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

May be your current iteration strategy is wrong. Not too familiar with the POI API since I haven't used it quite a while.

Anyway have a look at this for insight.

The POI guide here may help you too with POI in general.
 
Vijay Inani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! The getCell method worked. cellIterator has some issues.
 
What? What, what, what? What what tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic