C# XSSFRow 用法
//建立 WorkBook 及試算表
XSSFWorkbook workbook = new XSSFWorkbook();
//1.NEW SHEET
XSSFSheet mySheet1 = (XSSFSheet)workbook.CreateSheet("年門急住檢驗次數統計");
//mySheet1.DefaultColumnWidth = 15; //預設的字元寬度
//建立標題列 Header
XSSFRow rowHeader = (XSSFRow)mySheet1.CreateRow(0);
// 2.ADD HEAD
// 建立第一行設定表頭資料
mySheet1.CreateRow(0);
mySheet1.GetRow(0).CreateCell(0).SetCellValue("年月");
mySheet1.GetRow(0).CreateCell(1).SetCellValue("門");
mySheet1.GetRow(0).CreateCell(2).SetCellValue("急");
mySheet1.GetRow(0).CreateCell(3).SetCellValue("住");
mySheet1.GetRow(0).CreateCell(4).SetCellValue("小計");
mySheet1.GetRow(0).CreateCell(6).SetCellValue("年月");
mySheet1.GetRow(0).CreateCell(7).SetCellValue("門");
mySheet1.GetRow(0).CreateCell(8).SetCellValue("急");
mySheet1.GetRow(0).CreateCell(9).SetCellValue("住");
mySheet1.GetRow(0).CreateCell(10).SetCellValue("小計");
XSSFRow rowItem2 = (XSSFRow)mySheet1.CreateRow(iTestCount + 1);
rowItem2.CreateCell(0, CellType.String).SetCellValue("採檢件數");
rowItem2.CreateCell(1, CellType.Numeric).SetCellValue(iTestCount);
rowItem2.CreateCell(2, CellType.String).SetCellValue("陽性件數");
rowItem2.CreateCell(3, CellType.Numeric).SetCellValue(iPosCount);