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 2011/03/01 17:36:34 UTC

DO NOT REPLY [Bug 47100] Change Worksheet name, related formula are not updated

https://issues.apache.org/bugzilla/show_bug.cgi?id=47100

--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> 2011-03-01 11:36:29 EST ---
It is a bug in XSSF. 

In the binary .xls format formulas are stored in parsed form as sequences of
tokens. The Sheet Name token just points to the corresponding SheetRecord and
when you change that SheetRecord  all depending formulas are automatically
updated. 

The .xlsx format is totally different. It is a zip of xml files and formulas
are stored in plain text. XSSFWorkbook.setSheetName just updates the
corresponding bits in workbook.xml and that's all. No formulas are updated.  

To fix your problem,  XSSFWorkbook.setSheetName should iterate over all
formulas and named ranges and update the sheet name. 


Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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