//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; System.IO.Stream stream = this.GetResourceStream("Smiling-Girl.svg"); GrapeCity.Documents.Excel.Drawing.IShape picture = worksheet.Shapes.AddPicture(stream, GrapeCity.Documents.Excel.Drawing.ImageType.SVG, 20, 20, 120, 200); // Save to an excel file workbook.Save("AddSvgFile.xlsx");
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim stream As IO.Stream = GetResourceStream("Smiling-Girl.svg") Dim picture As IShape = worksheet.Shapes.AddPicture(stream, ImageType.SVG, 20, 20, 120, 200) ' save to an excel file workbook.Save("AddSvgFile.xlsx")