Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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: 134
5
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
  • 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
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!