|Summary:||Add support for named ranges in formulas|
|Product:||POI||Reporter:||Orr Bernstein <orr>|
|Component:||HSSF||Assignee:||POI Developers List <dev>|
|Attachments:||Replaced the comment in FormulaParser:Ident identifying the need to support named ranges|
Description Orr Bernstein 2007-09-28 13:38:21 UTC
Named ranges can be used in formulas in place of cell/area references or literals. There was a comment in the trunk version of the code about needing to add support for this - this bug addresses that need.
Comment 1 Orr Bernstein 2007-09-28 13:46:35 UTC
Created attachment 20895 [details] Replaced the comment in FormulaParser:Ident identifying the need to support named ranges This patch implements formula support for named ranges by first identifying cell references using a regex. Anything that isn't a cell reference or boolean literal is then checked against the workbook's set of NameRecords. If no NameRecord is found, Abort is called with an error message to that effect. Otherwise, a "NamePtg" is added to the tokens list. The cell reference regex is very liberal in order to support future versions of Excel. For example, it allows any length sheet name (though Excel 2003 only supports 31-character sheet names); it allows any number of alphabetical characters as the column reference (Excel 2007 supports 2^14 columns - three characters); and it allows any number of digits as the row reference (again, Excel 2007 supports 2^20 rows - 7 digits).
Comment 2 Nick Burch 2008-01-08 07:10:47 UTC
Thanks for this, committed (had to make a few small tweaks), along with a unit test for it