• 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

Apache POI : need a quick help, need to read XLS cell using Column Name

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am using apache poi to read XLS file.

currently i am reading cell value as follows :



so for example, if the row number is 6, i will get value of cell B6.

Now, my requirement is , I need to read the cell by using column name and not by column header.
For example, if the column name of column header B is Employee Name, i want to access value of cell, at row 6 and under column Employee Name.

So in future, if the column header P is having name Employee Name instead of column B , my program will not get affected.

Is it possible, using apache poi, to access value using column Name and not by column header??


Regards,
Indrayani
 
Ranch Hand
Posts: 135
5
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no in-built method comes under Apache POI for this purpose. Hopefully, they'll add this in a future release. For the moment you can use this Solution.
Regards,
Jude
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic