Bug 58085

Summary: [patch]remove sheet changes non-removed sheet references in formula
Product: POI Reporter: yli <Yulei.Li>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical Keywords: PatchAvailable
Priority: P2    
Version: 3.13-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: handling ExternalSheetRecord when removing sheet
test class to illustrate the issue
check null pointer for linkTable when no name references defined

Description yli 2015-06-30 13:44:04 UTC
Created attachment 32864 [details]
handling ExternalSheetRecord when removing sheet

We have xls file that defines many Name references, after calling removeSheetAt(), and save the workbook to a new file. Open the file in Excel, go to Formulas->Name Manager, some Names' reference sheet name got changed.

The issue exists in 3.11.Final, 3.12.Final and trunk.
Comment 1 yli 2015-06-30 14:05:02 UTC
Created attachment 32865 [details]
test class to illustrate the issue
Comment 2 yli 2015-07-07 15:26:24 UTC
Created attachment 32889 [details]
check null pointer for linkTable when no name references defined

recreated patch with extra check for null pointer
Comment 3 Dominik Stadler 2015-10-23 12:45:51 UTC
The patch is applied via r1710193, thanks a lot for the patch!