圖片插入方法:
Imports Spire.Xls
Namespace InsertImage
Friend Class Program
Shared Sub Main(ByVal args() As String)
"Create Workbook
Dim workbook As New Workbook()
Dim sheet As Worksheet = workbook.Worksheets(0)
"Insert Image
sheet.Pictures.Add(1, 1, "E:\work\sample.jpg")
"Save and Launch
workbook.SaveToFile("ExcelImage.xlsx", ExcelVersion.Version2010)
System.Diagnostics.Process.Start("ExcelImage.xlsx")
End Sub
End Class
End Namespace
圖片插入方法:
Imports Spire.Xls
Namespace InsertImage
Friend Class Program
Shared Sub Main(ByVal args() As String)
"Create Workbook
Dim workbook As New Workbook()
Dim sheet As Worksheet = workbook.Worksheets(0)
"Insert Image
sheet.Pictures.Add(1, 1, "E:\work\sample.jpg")
"Save and Launch
workbook.SaveToFile("ExcelImage.xlsx", ExcelVersion.Version2010)
System.Diagnostics.Process.Start("ExcelImage.xlsx")
End Sub
End Class
End Namespace