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

            Bug ID: 57171
           Summary: Moving the active sheet and deleting the others
                    results in a corrupted file
           Product: POI
           Version: 3.11-dev
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 32171
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32171&action=edit
The file used in my tests

Same use case as in bug #57165.

To keep only a selected sheet, I have to move it at first position, then delete
the others.
But if this sheet is the active one (or, perhaps, the selected one), Excel 2010
then complains about the file it opens.

Looking at the file it points out, I found out that the reference to the active
sheet has not been updated, so it points now to a non-existing sheet.

French Excel error message is:
Enregistrements supprimés: Affichage dans la partie /xl/workbook.xml (Classeur)

which can be roughly translated to:
Removed records: Display in the /xl/workbook.xml part (Workbook)

When I open the pointed out file, I see:

<?xml version="1.0" encoding="UTF-8"?>
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main";
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships";><fileVersion
appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303"/><workbookPr
filterPrivacy="1" defaultThemeVersion="124226"/><bookViews><workbookView
xWindow="120" yWindow="210" windowWidth="21075" windowHeight="7680"
activeTab="5"/></bookViews><sheets><sheet name="Informative" sheetId="7"
r:id="rId6"/></sheets><calcPr calcId="125725"/></workbook>

Notice the activeTab="5" part.
Also notice the sheetId="7" r:id="rId6" part, which might be part of the bug
above mentioned.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to