我已经从 NPOI 在 MemoryStream 中创建了一个 Excel。
非营利组织代码:
Dim oFile As New FileStream(Path:=context.Server.MapPath("./Test.xls"), mode:=FileMode.Open)
Dim wb As New HSSFWorkbook(oFile)
Dim ms As New MemoryStream
Dim sheet As HSSFSheet = wb.GetSheet("NPOI_TEST")
Dim cell As HSSFCell = Nothing
cell = sheet.GetRow(0).GetCell(0)
cell.SetCellValue("Sheet1")
wb.Write(ms) '<=The ms object is a Excel in MemoryStream
以及如何使用 iTextSharp 获取 NPOI 的 Memorystream 并输出 PDF 文件?