Skip to content

Resolve new Xlsx changes introduced by MS Office365 moving AutoFilter information into a separate file #2216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MarkBaker opened this issue Jul 8, 2021 · 3 comments

Comments

@MarkBaker
Copy link
Member

This is:

- [ ] a bug report
- [X] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

AutoFilter structure information is now maintained in a separate /table<n>.xml file in the /tables subfolder of the zip.

What is the current behavior?

AutoFilter structure information is read from the autoFilters entry in the individual worksheet files.

With changes to the structure of Xlsx files for Office365, autoFilter structure information is moved from the worksheet file. Instead, the worksheet file contains a tableParts entry:

<tableParts count="1">
    <tablePart r:id="rId1"/>
</tableParts>

This may contain multiple parts, and each entry points to an entry in the rels file for that worksheet. This in turn has a pointer to the actual file

<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
    <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table1.xml"/>
</Relationships>

where the AutoFilter structure is stored.

The actual structural definition of the AutoFilter is otherwise identical, simply moved to a new location.

@oleibman
Copy link
Collaborator

oleibman commented Jul 8, 2021

I want to cry.

@MarkBaker
Copy link
Member Author

That's just how I felt last night while I was exploring the changes. I wonder just how much else has been "moved" as well.... I want to address this as part of the work I'm planning with pivot tables, and actually have a Table Reader that handles all Excel table types (pivot, autofilter, etc); but I'll approach it step by step, with a lot of cation, especially as I'm seeing namespace use in tableParts.

@MarkBaker
Copy link
Member Author

PR merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants