Skip to content

Xlsx Reader and Writer : Header/footer image description - #5057

Open
dkulyk wants to merge 3 commits into
PHPOffice:masterfrom
dkulyk:xlsx-header-footer-image-alt
Open

dkulyk wants to merge 3 commits into
PHPOffice:masterfrom
dkulyk:xlsx-header-footer-image-alt

Conversation

@dkulyk

@dkulyk dkulyk commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Why is this change needed?

Fixes #5056.

The description of a header/footer image was dropped on write and not read. Excel keeps it in the alt attribute of the image's VML shape; o:title stays the name. Checked in Excel for Windows: Alt Text set on a header picture is saved there, and Format Picture shows the description of an image written with this change.

  • Writer: alt on v:shape when the description is set; nothing changes without one.
  • Reader: alt back into setDescription().

Writer\Xlsx\HeaderFooterImageDescriptionTest fails on master.

dkulyk and others added 3 commits October 17, 2026 00:01
A header/footer image had no alternative text in Xlsx: the VML writer
put only the name into o:title of v:imagedata. Excel keeps the
alternative text in the alt attribute of v:shape (ECMA-376 Part 4), so
the description is now written there when set, and read back.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Xlsx: the description of a header/footer image is lost

2 participants