You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [X] a bug report
- [ ] 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 initially reported this in #2274, but then prematurely closed it when I thought it was fixed.
I would have hoped that using the setAutoSize function would have appropriately determined the correct size for a column when the function setAutoFilter had already be applied.
Font::setTrueTypeFontPath("/usr/share/fonts/msttcore/");
Font::setAutoSizeMethod(Font::AUTOSIZE_METHOD_EXACT);
...// Apply filtering capability to the worksheet$worksheet->setAutoFilter($worksheet->calculateWorksheetDimension());
// Apply auto size to all columnsforeach (range('A',$workSheetMaxColumns) as$col) { $worksheet->getColumnDimension($col)->setAutoSize(true); }
...
What is the current behavior?
It does not seem to take into account the filter icon shown in the column. See attached images
When I double click on the column seperator in excel it widens the column widths to my satisfaction.
Which versions of PhpSpreadsheet and PHP are affected?
version 1.18.0+
I thought this was fixed, but I guess I fixed it myself and then lost the fix when upgrading from 1.18.0 to 1.20.0. I am trying to figure out what I did to fix it.
Before in 1.18.0 with may fix:
After in 1.20.0 after losing my fix:
You can see that the columns are not taking in account the filter icon.
The text was updated successfully, but these errors were encountered:
@MarkBaker Thank you very much that makes it a lot better. I would suggest increasing the adjustment from 3 to 5. Line 256 str_repeat('n', 1 * ($filterAdjustment ? 5 : 1)), Line 273 str_repeat('n', 1 * ($filterAdjustment ? 5 : 1)),
With a value of 3 the filer dropdown icon is still very tight.
This is:
What is the expected behavior?
I initially reported this in #2274, but then prematurely closed it when I thought it was fixed.
I would have hoped that using the setAutoSize function would have appropriately determined the correct size for a column when the function setAutoFilter had already be applied.
What is the current behavior?
It does not seem to take into account the filter icon shown in the column. See attached images
![AutoFilter AutoSize NotCalculated](https://user-images.githubusercontent.com/3777526/129465820-a7cd6ab7-4547-410a-9969-8483aa58d3c6.png)
When I double click on the column seperator in excel it widens the column widths to my satisfaction.
![AutoFilter AutoSize ExcelCalculated](https://user-images.githubusercontent.com/3777526/129465842-1b7a7716-ce65-47d4-8800-e84a05c749b4.png)
Which versions of PhpSpreadsheet and PHP are affected?
version 1.18.0+
I thought this was fixed, but I guess I fixed it myself and then lost the fix when upgrading from 1.18.0 to 1.20.0. I am trying to figure out what I did to fix it.
Before in 1.18.0 with may fix:
![image](https://user-images.githubusercontent.com/3777526/143259301-a85fb08f-9c9c-4faf-93b0-7cdc7e88191d.png)
After in 1.20.0 after losing my fix:
![image](https://user-images.githubusercontent.com/3777526/143259448-c95ea54e-e016-44c0-8712-fac0f922269c.png)
You can see that the columns are not taking in account the filter icon.
The text was updated successfully, but these errors were encountered: