This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find column number by StringCellValue

 
jake demus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
i'm tryin to read just 2 particular columns from an excel sheet and write them to a txt file.
My problem is i have the cellNum hardcoded here (cell.getCellNum()==0) which works but these columns may be in different places depending on the sheet.
The column i'm tryin to find has a StringCellValue of "Rule ID" but i don't want this String to write to the txt file.
Hope i've been sort of clear.
Any help would be greatly appreciated!


 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jake and welcome to Javaranch! What library are you using? POI?
 
jake demus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
Ya it's POI.
The sheets were created in Excel 2003.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic