0

Excuse me, This is the result of exported report: enter image description here I want to resize width of B column.. I try use :

$sheet->setWidth('B', 5);

But it is not working I try to set width at the html table :

<td width="201"><img src="assets/images/upload/{{$row->photo}}" width="200px"/></td>

It is not working too.

I make A1 cell merging until W1 and A3 cell merging until W3 But, it is not working too.

I use blade, and there are images at B column.

Community
  • 1
  • 1
Khaneddy2013
  • 1,301
  • 1
  • 17
  • 25
  • No idea, but 5 is definitely too small for that image. Maybe that's the problem,, other than that, no idea. – Lorenz V. Sep 30 '14 at 11:14

1 Answers1

2

I think it's really hard to achieve that. I've tested it for a while but it doesn'r work as it should.

You could try changing:

<td width="201"><img src="assets/images/upload/{{$row->photo}}" width="200px"/></td>

into

<td width="20" height="100"  margin="0" >test</td>

now you should have square cell - as you see those dimension are not pixels (and height must be bigger than width). The same you should try to do with image itself without using pixels and using smaller dimensions for example:

<img src="assets/images/upload/{{$row->photo}}" width="50"/>

but in my case it is still far for desired effect

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291