I've been trying to set the row height and the column width to the exact size in pixels of an image added to the cell, but I can't make it to fit, I've been trying with the examples given here (https://github.com/natergj/excel4node/issues/182#issuecomment-375118910), for example setting the column width with:
Hi,
I've been trying to set the row height and the column width to the exact size in pixels of an image added to the cell, but I can't make it to fit, I've been trying with the examples given here (https://github.com/natergj/excel4node/issues/182#issuecomment-375118910), for example setting the column width with:
ws.column(ws.lastUsedCol).setWidth( Math.trunc(((imageSize.width - 11) / 7) * 100 + 0.5) / 100 );
where
imageSize.width
is the pixels width but still it doesn't fit perfectly the image width, how can I implement this?Also, how can I center an image in a cell by using the position colOff and rowOff?
Thanks