Reputation: 1122
Today I had a little problem with excelphp. I wanted to set the default width of the columns manually and only one single time.
I found a few solutions also here on stackoverflow which suggested to change the value for every single column (e.g. within a loop).
But I wanted to do it with a single command.
Upvotes: 7
Views: 13009
Reputation: 1122
After browsing the source code I found out the following solution:
$phpExcelObject->getActiveSheet()->getDefaultColumnDimension()
->setWidth($myCustomWidth);
I hope that this helps anybody else ;)
Upvotes: 25