<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
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using NPOI.XWPF.UserModel; public partial class Default2 : System.Web.UI.Page { protected void
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(