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 ASheet!A1 #REF!A1 for me, whereas I expect it to print ASheet!A1 for both cases.
Created attachment 29904 [details] Java code to demonstrate issue
Maybe the same as Bug 53832...
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.