PHPExcel icon indicating copy to clipboard operation
PHPExcel copied to clipboard

Image height squashed to 75% (PHPExcel_Worksheet_Drawing)

Open SpareShade opened this issue 9 years ago • 2 comments

Hi there, thank you for this great set of tools!

I'm using PHPExcel_Worksheet_Drawing to place images inside the worksheet, everything is working fine except that images' height is squashed to 75%. I'm only using 'setRowHeight' to set the row height and nothing else that could impact the image size.

Once the produced excel file is opened in MS Excel and opening 'Format Picture' for each image the info under 'Size' -> 'Scale' is set to 'Height: 75%' and 'Width: 100%' - changing Height to 100% corrects the image.

Any help as to why would be much appreciated.

SpareShade avatar Jun 22 '15 13:06 SpareShade

I hava same problem, could you tell me how me solve it?

sparksofire avatar Jul 10 '17 10:07 sparksofire

i solve it, with this:

$this->spreadsheet->getActiveSheet()->getRowDimension(1)->setRowHeight($drawing->getHeight() - ($drawing->getHeight() * .25)); $drawing->setWorksheet($this->spreadsheet->getActiveSheet());

DevJuliocesar avatar Mar 06 '18 19:03 DevJuliocesar