This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification 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
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Problem with apache POI.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again.

I am trying basic in apache POI to READ a cell by setting the numbers. Like read cell(1,1), not read cell(A1). I founded solution but i want better one if someone can help me.

The thing i hate is: String columnLetter = CellReference.convertNumToColString(start_column);

I convert number of column in a letter because only solution i found was:



There HAS to be beter way. But i am just Java learning greenhorn please if can anyone help. And another basic: how can i reference all apache POI library?

To get from this:


To something like this (i tried that and it says that is unused import):


My entire working code:
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Other Open Source forum.
 
Saloon Keeper
Posts: 5882
147
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using a CellReference at all if you have the numerical row and column indexes? sheet.getRow(start_row) and row.getCell(start_column) should work fine.
 
Mojster Jaka
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:Why are you using a CellReference at all if you have the numerical row and column indexes? sheet.getRow(start_row) and row.getCell(start_column) should work fine.



Because i am greenhorn. Thank you for solution, i didn't see it myself.

I am posting a changed code below:
 
If you are using a rototiller, you are doing it wrong. Even on 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!