if (dtItem.Rows[i]["PicName"].ToString() != "") { Worksheet sheet = worksheetItemOption; if (sheet != null) { string Pic = dtItem.Rows[i]["PicName"].ToString(); Picture pict = sheet.Pictures(Pic) as Picture; pict.CopyPicture(XlPictureAppearance.xlScreen, XlCopyPictureFormat.xlBitmap); System.Drawing.Image img = Clipboard.GetImage(); MemoryStream ms = new MemoryStream(); img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] bytes = ms.ToArray(); postImportRequest.CommonMenu.Image = bytes; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)