Created attachment 26503 [details] Changes related to function implementation of CLEAN and ADDRESS.Newly added files will be in Zip format. Submitting patches for two new function implementations(CLEAN and ADDRESS).
I have introduced two new excel function that were not implemented yet in POI. The functions are CLEAN and ADDRESS. I have submitted a Zip file that contains all the new files as well as the changed files. Kindly do the review so that I can check-in the files. Thanks, Aniket
Applied in r1060788 with some tweaks. Your implementation of the CLEAN function was not quite correct. According to the Excel docs, the CLEAN function removes the first 32 nonprinting characters in the 7-bit ASCII code (values 0 through 31). All other characters are not affected. This means that CLEAN does not remove any unicode characters above ASCII, including nonprinting unicode characters (values 127, 129, 141, 143, 144, and 157). I changed your code to follow Excel's rules. The ADDRESS function is actually a wrapper around org.apache.poi.ss.util.CellReference. This is a fundamental class in POI and should be cell reference operations. Your implementation has a bug and throws IndexOutOfBoundsException for columns greater than 702, i.e. Address.getColName(702) works and Address.getColName(703) fails. I removed this method and used CellReference#formatAsString instead. Other than that, very good. Thanks for the good patch! Regards, Yegor
*** Bug 50384 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > *** Bug 50384 has been marked as a duplicate of this bug. *** Thanks Yegor.