UltraWebGridExcelExporter
The result it's to have the html code in the Cell ... like this
<img src='C:\Progetti\SpinnakerNetInf\ObjImg\762008/img029.jpg' width=110 Height=73>
Could you please tell me if there is some specific command to give to the row to export immage?
Or Ho can nested the picture on Excel export ?
Thank you
Alessandro
Hello,
I have used your code. Problem is if I want to make image size bigger then it not work. Also it will not fit in the cell. in this case cell size should increase to incorporate image size.
Can you help me ?
Workbook workbook = new Workbook();Worksheet worksheet = workbook.Worksheets.Add( "Sheet1" );
Rectangle cellA1Bounds = worksheet.Rows[ 0 ].Cells[ 0 ].GetBoundsInTwips();
Image image = Image.FromFile( "C:\\image.bmp" );WorksheetImage imageShape = new WorksheetImage( image );imageShape.SetBoundsInTwips( worksheet, cellA1Bounds, true );
worksheet.Shapes.Add( imageShape );
Hi Mike,
Thank you for answare me .
Could please setup a quickly demo in VB.net or C# ? I was trying to use WorkSheetImage .. but whitout any result :-(
Regards
Currently, images must be manually exported by creating a WorksheetImage instance. If you want to position the image inside a cell, you can call GetBoundsInTwips() on a WorksheetCell instance. Pass the returned Rectangle to the SetBoundsInTwips method on the WorksheetImage. Then add the WorksheetImage to the Shapes collection on the Worksheet. Use the overload of SetBoundsInTwips which takes a maintainAspectRatio boolean parameter to make sure the image is not distorted.