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.
After browsing the source code I found out the following solution:
$phpExcelObject->getActiveSheet()->getDefaultColumnDimension()
->setWidth($myCustomWidth);
I hope that this helps anybody else ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With