• 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
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic