详细教程: http://blog.csdn.net/xxs77ch/article/details/50216033 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Configuration; usin
HSSFSheet sheet = hssfworkbook.CreateSheet("new sheet"); // Create a row and put some cells in it. Rows are 0 based. HSSFRow row = sheet.CreateRow(); // Create a cell and put a value in it. HSSFCell cell = row.CreateCell(); // Style the cell wit
需要引入dll文件 也可以在NuGet里面管理(推荐) 比较方便 . using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CSR_Web.Common { public class NPOIExport { public static NPOI.HSSF.UserModel.HSSFWorkbook DoExport(System.Data.DataTabl