我做在ASP.NET中的表單,目前與ClosedXML工作,是否有插入工作表內部的圖像中的位置的方式?我有這樣的代碼closedxml添加圖像VB
Dim wb As New XLWorkbook()
Dim ws As IXLWorksheet = wb.Worksheets.Add("NAME")
Dim httpResponse = Response
httpResponse.Clear()
httpResponse.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
'INSERT IMAGE HERE'
ws.insertimage("imagepath")'???
Dim namedoc As String = "namedoc"
httpResponse.AddHeader("content-disposition", "attachment;filename=""" + namedoc+ ".xlsx""")
Using tmpMemoryStream As MemoryStream = New MemoryStream()
wb.SaveAs(tmpMemoryStream)
tmpMemoryStream.WriteTo(httpResponse.OutputStream)
tmpMemoryStream.Close()
End Using
httpResponse.End()
感謝,這是很好的瞭解,有幾個方式,但非常複雜,最終我用一個文件與圖像空白 –