private Workbook ExportWorkbook(GridViewDataControl grid) { var imageExtension = "png"; var imageWidth = 20; var imageHeight = 23; var padding = 5; Workbook workbook = grid.ExportToWorkbook(); Worksheet worksheet = workbook.ActiveWorksheet; var usedRows = worksheet.UsedCellRange.RowCount; var usedColumns = worksheet.UsedCellRange.ColumnCount; for (int i = 0; i < usedRows; i++) { for (int j = 0; j < usedColumns; j++) { var cell = worksheet.Cells[i, j]; var cellValue = cell.GetValue().Value.RawValue; if (cellValue.Contains(string.Format(".{0}", imageExtension))) { FloatingImage image = new FloatingImage(worksheet, new CellIndex(i, j), padding, padding); Stream stream = File.Open("../../" + cellValue, FileMode.Open, FileAccess.Read); using (stream) { image.ImageSource = new Telerik.Windows.Documents.Media.ImageSource(stream, imageExtension); } image.Width = imageWidth; image.Height = imageHeight; worksheet.Shapes.Add(image); cell.SetValue(string.Empty); worksheet.Rows[i].SetHeight(new RowHeight(imageHeight + padding * 2, true)); } } } return(workbook); }