You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/07/15 19:53:41 UTC
[Bug 55269] New: Create cell name formula text from CellReference
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: dev@poi.apache.org
Reporter: dance@web.de
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org