Add image in excel using SpreadSheetDocument
I have an excel file with data in it and i want to add and image in it so can anyone help me to do it?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
White Evaln26 pointsPosted Aug 27, 2012, 7:45 PM EDT
Imports Spire.Xls
Dim workbook As Workbook = New Workbook()
Dim sheet As Worksheet = workbook.Worksheets(0)
sheet.Pictures.Add(1,1,"..\day.jpg")
workbook.SaveToFile("sample.xls")
ExcelDocViewer(workbook.FileName)
End Sub
Private Sub ExcelDocViewer(ByVal fileName As String)
Try
System.Diagnostics.Process.Start(fileName)
Catch
End Try
End Sub
See details of Excel Image with VB.NET