Hi Folks,
is it possible to get the embeddid pics out of excel into a grid somewhat other like this ...
int cc = -1; // column name ArrayList cellList = new ArrayList(); for (int iRow = 1; (iRow <= 65535); iRow++) { cc = iRow -1; foreach (WorksheetCell cell in w.Rows[iRow].Cells) { if ((!(cell.Value == null) && (cell.Value.ToString().Length > 0))) { cellList.Add(cell.Value.ToString()); } else { if (cc > -1 && ((Infragistics.Excel.WorksheetImage)(cell.Worksheet.Shapes[cc])).Image != null) { cellList.Add(((Infragistics.Excel.WorksheetImage)(cell.Worksheet.Shapes[cc])).Image); } cc = -1; } } // cell if ((cellList.Count > 0)) { table.Rows.Add(cellList.ToArray()); cellList.Clear(); } else { iRow = 65535; }
And show it in the Grid as picture - at the Moment it's a System.Drawing.Bitmap
If the grid cell contains a Bitmap and the DataType of the Column is Bitmap, then it should display automatically. If the DataType of the column is not Bitmap, then you need to set the Style of the Column to Image.
Hi,
How i can import picture in excel from my ultra wingrid ?
I don't understand your question. Are you trying to import an image from Excel or from a WinGrid? If it's from a WinGrid, then what are you trying to import it to?
Hi Mike,
I have some images in my WinUltraGrid and i have to import these
images into excel from UltraWinGrid. Hope, now everything is clear to you.
Okay, so you want to export a grid to an Excel file and include the images?
You can export a WinGrid to Excel using the UltraGridExcelExporter component. The latest version automatically exports some images - it depends what images you are referring to. Are these images in the Value of a cell? Or are they provided via an Appearance property? If they are from an Appearance, are they coming from the Image property or ImageBackground. ImageBackground is not supported because I don't think Excel supports this.
Also, what version of the grid are you using? Some older versions may not have support for exporting images.