Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Export Image to Excel
posted

I can export an image to Excel but the image is sized to the row/cell. How can I export the image and have it keep its original dimensions. I don't want it resized.

WorksheetImage img = new WorksheetImage(image);
img.TopLeftCornerCell = worksheet.Rows[rowIndex].Cells[0];
img.TopLeftCornerPosition =
new PointF(0.0F, 0.0F);
img.BottomRightCornerCell = worksheet.Rows[rowIndex + 8].Cells[2];
img.BottomRightCornerPosition =
new PointF(100.0F, 100.0F);
worksheet.Shapes.Add(img);

Thank you!

Parents Reply Children
No Data