<1> using System; using System.Collections.Generic; using System.Linq; using System.Web; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.SS.Formula.Functions; using System.IO; using System.Text; namespace 导入导出Excel { /// <summary&g…
Public Sub BuildExcel() '写入内容到Excel Dim hssfworkbook As HSSFWorkbook = WriteExcel() Dim destFileName As String = "D:\test.xls" Dim msfile As New MemoryStream() hssfworkbook.Write(msfile) System.IO.File.WriteAllBytes(destFileName, msfile.ToArray(…
如果只是简单的处理的话,只需要引用下载压缩包里的 NPOI.dll (office 2003)或 NPOI.OOXML.dll (office 2007) 文件而已. using System; using System.Collections.Generic; using System.Linq; using System.Text; using NPOI.SS.UserModel; using System.IO; using NPOI.XSSF.UserModel; namespace N…