我正在使用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()
答案 0 :(得分:1)
答案 1 :(得分:0)
Raidri说,我认为你不能。
但是我使用它来使用Open XML,尽管它不是很简单:
http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/