npoi设置数据有效性 public void SetDataValidate(ISheet sheet, int firstCol, int lastCol) { CellRangeAddressList regions = new CellRangeAddressList(1, 65535, firstCol, lastCol); DVConstraint constraint = DVConstraint.CreateDateConstraint( (int)ComparisonOpera
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
最近在做的一个项目中需要生成Excel,通过学习使用NPOI实现了相关需求,写了一个简便操作的类,记录如下: public class NPOIHelperForExcel { #region excel文件属性 //作者 public string Author { get; set; } //标题 public string Title { get; set; } //主题 public string Subject { get; set; } //标记 public string Keyw