Not certain what you are asking here but I am going to assume you want to get at the formula a cell contains so that you can see whether it contains - for example - the IF function.
The quick and dirty method - without recourse to using the formula parser is quite simple; 1. Get the cells type - cell.getCellType() 2. Compare that to the constant Cell.CELL_TYPE_FORMULA. 3. If they are equal, you have a formula cell and can get at the formula itself by calling the getCellFormula() method on the cell. That will return a String that encapsulates the formula entered into the cell and you can then use Java's String handling functionalist to see what formula you have. Alternatively, use the method Yegor outlined and simply look at the tokens, stepping through them to see what function/formula you have. There is no pre-defined method in POI that simply allows you to conduct a search operation on the contents of cells in a sheet; you would have to write that for yourself. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-do-i-get-formula-in-excel-workbook-using-apache-poi-3-7-tp5520843p5521186.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]
