Click here to Skip to main content
16,020,345 members

Comments by saurabhdsadasdasd (Top 1 by date)

saurabhdsadasdasd 5-Jul-12 2:05am View    
Microsoft.Office.Interop.Excel.Range picPosition = excelSheet.Cells[i, j]; // retrieve the range for picture insert
Microsoft.Office.Interop.Excel.Pictures p = excelSheet.Pictures(System.Reflection.Missing.Value) as Microsoft.Office.Interop.Excel.Pictures;

Microsoft.Office.Interop.Excel.Picture pic= p.Insert(FilePath, missing);
pic.Left = Convert.ToDouble(picPosition.Left);
pic.Top = picPosition.Top;
pic.Placement = Microsoft.Office.Interop.Excel.XlPlacement.xlMoveAndSize;