Hi,
I am using win UltraGrid to export table in excel. My problem is when I am trying to export Image column in excel sheet. its not being exported.
In the excel, Column shows "System.Drawing.Bitmap".
I'm wondering if there is a way to export image in excel. Please help me ASAP
Currently, the grid exporter does not support the exporting of images. However, image support was added to our Excel engine in the 7.2 release, so you can export these manually. However, images in an Excel worksheet are not associated with cells, they are just sitting on top of the worksheet, so some work will need to be done to fake like the images are in the cells.
First, handle the CellExported event of the exporter. If the value of the grid cell being exported is an Image or Bitmap, then you can place that image on the worksheet over the corresponding Excel cell. Create a new Infragistics.Excel.WorksheetImage to hold the image for the cell. Set the TopLeftCornerCell and the BottomRightCornerCell properties of the WorksheetImage to the Excel cell. Then set the TopLeftCornerPosition to PointF.Empty and the BottomRightCornerPosition to new PointF(100,100). This will place the top-left corner of the image at the top-left corner of the cell and the bottom-right corner of the image at the bottom-right corner of the cell. Set the PositioningMode to ShapePositioningMode.MoveAndSizeWithCells so the images will stay above the cells even if the user resizes rows and columns. Then set the size of the rows and columns based on the image size.
I would also recommend submitting a feature request for doing this automatically: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
Hi I'm trying to add an image to a worksheet but have no luck. I have read several posts on the infragistics forums but none of them use Excel engine in the 7.1 release. Can someone assist me in adding an image to worksheet in this specific version? I’ve tried the WorksheetImage but this is not available in the current version that I’m using. Any suggestions welcome.
Unfortunately, support for images was not added to the Excel assembly until version 7.2. You will need to upgrade to be able to use this feature.