This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Find column number by StringCellValue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Find column number by StringCellValue" Watch "Find column number by StringCellValue" New topic
Author

Find column number by StringCellValue

jake demus
Greenhorn

Joined: Dec 16, 2009
Posts: 2
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Jake and welcome to Javaranch! What library are you using? POI?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
jake demus
Greenhorn

Joined: Dec 16, 2009
Posts: 2
Thanks for the reply.
Ya it's POI.
The sheets were created in Excel 2003.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Find column number by StringCellValue