Skip to content

Add image in excel using SpreadSheetDocument

Pinky Lad

Asked Aug 25, 2012, 3:17 AM EDT1 answer
Share
LinkedInX
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.

  • 0
    I have no the dll, so I am afraid it is hard to help you, but you add the image in another way:

    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
    0