Bug 54500 - removeSheetAt of unrelated sheet corrupts names
Summary: removeSheetAt of unrelated sheet corrupts names
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-01-29 09:35 UTC by Thomas Themel
Modified: 2013-11-02 10:08 UTC (History)
0 users

Sample XLS document used in test (11.50 KB, application/vnd.ms-excel)
2013-01-29 09:35 UTC, Thomas Themel
Java code to demonstrate issue (1.04 KB, text/x-java-source)
2013-01-29 09:36 UTC, Thomas Themel

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Themel 2013-01-29 09:35:34 UTC
Created attachment 29903 [details]
Sample XLS document used in test

I have attached a simple example program that creates a new sheet, defines a name on that sheet and then removes a _different_ sheet from the workbook. Surprisingly, this corrupts the name that the formula refers to.

The attached test prints


for me, whereas I expect it to print ASheet!A1 for both cases.
Comment 1 Thomas Themel 2013-01-29 09:36:32 UTC
Created attachment 29904 [details]
Java code to demonstrate issue
Comment 2 Dominik Stadler 2013-08-21 23:05:01 UTC
Maybe the same as Bug 53832...
Comment 3 Dominik Stadler 2013-11-02 10:08:32 UTC
I applied a fix and a testcase as r1538163, it currently only fixes references for names when removing sheets, so the bug when using setSheetOrder() reported in Bug 53832 is not yet fixed.