Insert Object (Picture) Properties

Topics: Developer Forum
Jan 21, 2015 at 11:46 AM
I'm inserting quite a few images into a spreadsheet and I'd like to know if it is possible to change their properties. Specifically, I want to set the picture properties to "Move and size with cells". I'm using the Excel2007 writer.

PHP version: 5.3.14
PHPExcel version: 1.7.7

Thank you
Jan 26, 2015 at 10:39 PM
There is no "Move and size with cells" option for images because any images added through PHPExcel are "single anchored", and the top left anchor for images should always be related to a specific cell with an X and Y offset to the top-left corner of that cell, and they have a defined height and width. Any adjustment requires manual intervention.
Feb 5, 2015 at 11:03 AM
Thanks for your reply.

When generating an export, I have to select an image, press Ctrl+a to select all images, right-click, go to properties and select "Move and size with cells" so that images are shown/hidden with the cells to which they are anchored when filters are applied. Seems a shame this can't be achieved programatically.