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?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
White EvalnPosted Aug 27, 2012, 11:45 PM
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