Hi,
I am using the cells component to export an image/picture to excel.
Here is the snippet i use to accomplish this.
iPictureindex = sheet.Pictures.Add(row,column,image)
How do i specify the width and height that i want. Say if i have a really large image and i just want it to have a width of 50px and a height of 100 px. Please let me know.
regards,
Jaideep.
Please refer to the following code:
Workbook workbook = new Workbook ();
Worksheet ws = workbook.Worksheets[0];
int temp = ws.Pictures.Add(1, 2, "d:\\test\\zp_logo.jpg");
Picture pic = ws.Pictures[0];
pic.WidthPt = 50;
pic.HeightPt = 100;
workbook.Save("d:\\test\\zp_logo_book.xls");
Thank you.
hi amjad,
Thanks for the reply.
I guess the pic.widthPt attribute is supported only in later versions of the apose.cells product. I currently have version 4.0.2.8. Please can you attach a version which supports those attributes.
regards
Jaideep.
I am sorry, the version number is 4.2.0.8.
Hi,
Please try this fix.
Hi warren,
I had reported about this earlier. I work for logixml inc and we have a current license, but when i tried using your new build , it still gives me the same error as i reported in this thread.
Adding an autoshape - specifically a Line in an excel cell
Please do take a look and let me know.
regards,
Jaideep.
Hi Jaideep,
Well, the build is created recently. If your license is already expired, you will get the error message and you have to renew your subscription. To test this feature, you can remove your SetLicense method call. It will continue to work except adding the license worksheet in output file.
Thank you.