Hi,

I need to search an excel sheet for specific text and then on finding it I need to note the cell address (example a1:b2 etc) of the cell that has the text. The I need to find the next occurrence of the same text within that
sheet and then again note the cell address. In VBA this would be

Cells.Find(What:="Table1", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
       :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
       False, SearchFormat:=False).Activate

&

   Cells.FindNext(After:=ActiveCell).Activate

VBA is hiding the details of its iteration.

Is this possible through POI?

Yes, by iteration.

http://poi.apache.org/spreadsheet/quick-guide.html#Iterator


Kindly note that iterating through the entire sheet is not an option for me
as the data in an sheet may be very large.

So it goes.

http://poi.apache.org/text-extraction.html


Also If this is not possible using POI is there a way to interact with VBA
interface using java somehow?

Then you are on Windows and would need some type of Java / .net bridge.

Good luck.

Regards,
Dave


Thanks for reading



--
View this message in context: 
http://www.nabble.com/How-to-perform-Find-and-Findnext-on-and-excel-sheet-using-POI-tp25721755p25721755.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to