https://issues.apache.org/bugzilla/show_bug.cgi?id=55269
Bug ID: 55269
Summary: Create cell name formula text from CellReference
Product: POI
Version: 3.9
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Hi
I struggle with creating formula text for named cells in Excel 2013.
The problem: surprisingly, the definition of the named cell changes depending
on the selected cell in excel. As if it was defined relative to the selected
cell.
Using the recipe in the quick guide
http://poi.apache.org/spreadsheet/quick-guide.html#NamedRanges
doesn't work. It creates a reference as "sheetname!A1:A1".
When creating a named cell in Excel, the reference is absolute, i.e. sheet!$A$0
Ideally, I'd wish an idiom such as:
cell.setFormulaText(CellReference(name));
would work.
I created two Gists that demostrate the problem:
This doesn't work with the desired idiom and the cookbook solution:
https://gist.github.com/dschien/6001876
This works (explicitly makes the ref absolute by inserting the '$' signs):
https://gist.github.com/dschien/6001918
Thanks,
Dan
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]