When you use PHPExcel to export an image to excel, the image size is displayed only in a certain proportion and cannot be displayed according to your requirements, can someone help me?
$ ObjDrawing = new PHPExcel_Worksheet_Drawing ();
$ ObjDrawing-> setName ('photo ');
$ ObjDrawing-> setDescription ('image inserted by pyxjm ');
$ ObjDrawing-> setPath ('.'. $ data ['lic _ litpic ']);
$ ObjDrawing-> setWidth ('122pt ');
$ ObjDrawing-> setHeight ('200pt ');
$ ObjDrawing-> setCoordinates ('G2 ');
$ ObjDrawing-> setOffsetX (2 );
$ ObjDrawing-> getShadow ()-> setVisible (true );
// $ ObjDrawing-> setMimeType (PHPExcel_Worksheet_MemoryDrawing: MIMETYPE_DEFAULT );
$ ObjDrawing-> setWorksheet ($ objPHPExcel-> getActiveSheet ());
Reply to discussion (solution)
$ ObjDrawing-> setHeight (122); // The Photo height.
$ ObjDrawing-> setWidth (200); // The Photo width.
$ ObjDrawing-> setHeight (122); // The Photo height.
$ ObjDrawing-> setWidth (200); // The Photo width.
This cannot be solved on the first floor. I tried it before ....
$ ObjDrawing-> setHeight (122); // The Photo height.
$ ObjDrawing-> setWidth (200); // The Photo width.
No one has answered the problem and I will give it to you.
Reference the reply on the first floor:
$ ObjDrawing-> setHeight (122); // The Photo height.
$ ObjDrawing-> setWidth (200); // The Photo width.
No one has answered the problem and I will give it to you.
After solving the problem, let's talk about the specific process.
If everyone has this kind of dedication
I guess you won't have to ask this question here, will you?
$ ObjDrawing-> setResizeProportional (false );
By default, the image is scaled according to the original image. it can be set to false.
The landlord does not share this information.