Skip to content
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

Using the setAutoFilter and setAutoSize on a Header with HORIZONTAL_CENTER #3395

Closed
1 of 8 tasks
cwolcott opened this issue Feb 22, 2023 · 4 comments
Closed
1 of 8 tasks

Comments

@cwolcott
Copy link

This is:

- [x] 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?

I would have hoped that the calculateColumnWidth would take into consideration the alignment of the header.

What is the current behavior?

The calculation looks great if the header has a HORIZONTAL_LEFT, but if the header is HORIZONTAL_CENTER the calculation could be to small.

Header is HORIZONTAL_LEFT
image

Header is HORIZONTAL_CENTER
image

What features do you think are causing the issue

  • Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet - 1.27.1
PHP - 8.1.13

@MarkBaker
Copy link
Member

MarkBaker commented Feb 23, 2023

This isn't simply a header value in a cell, or about the alignment of the header; but these headers all have a filter icon.

Please see Issue #3356 and PR #3358 and test against the latest master branch to see if this resolves your issue.

If it is a resolution, then 1.28.0 is due for release in the next week.

@oleibman
Copy link
Collaborator

@MarkBaker I have 3 PR's which I think should be part of the next release PR #3372, PR #3391, PR #3392. I will try to merge them by tomorrow morning (California time).

@cwolcott
Copy link
Author

I installed the master branch via composer

composer require "phpoffice/phpspreadsheet":dev-master
image

The master branch didn't fix the issue that I described when the header text is centered and has AutoFilter.
image

@cwolcott
Copy link
Author

@MarkBaker loaded the latest master branch
composer require "phpoffice/phpspreadsheet":dev-master
image

Looks good, thank you so much.
image

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

3 participants