Under some conditions, the parser will attempt to step off the end of the string and get an index out of bounds. This just adds a check to getChar that won't allow getCharAt to return something for a pointer that's byond the end of the string. Also uncommented Multiply and Divide in Expression. They seem to work correctly.
Created attachment 2327 [details] FormulaParser fixes for getChar
Thank you kindly for this patch. In the future please don't forget to add yourself to the "@author" tags. We like to share credit! :-) As just a humbe suggestion, it might be useful to create a unit test (new method off of src/testcases/org/apache/poi/hssf/model/TestFormulaParser) that demontrates teh bug so that it doesn't break again later. applied, please crosscheck.