我正在ASP.NET中做一个webform,目前正在使用ClosedXML,有没有一种方法可以在工作表中插入一个位置上的图像?
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()发布于 2015-11-12 10:05:05
发布于 2016-01-21 14:40:03
就像Raidri说的,我不认为你能做到。
但是我让它使用Open使用它,尽管它并不是很简单:
http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/
https://stackoverflow.com/questions/33655016
复制相似问题