public Sheet build() {Sheet sheet = (sheetName == null) ? workbook.createSheet() : workbook.createSheet(sheetName);Row currentRow;Cell currentCell;for (int rowIndex = 0; rowIndex < cells.length; ++rowIndex) {Object[] rowArray = cells[rowIndex];currentRow = sheet.createRow(rowIndex);for (int cellIndex = 0; cellIndex < rowArray.length; ++cellIndex) {Object cellValue = rowArray[cellIndex];if (cellValue != null || shouldCreateEmptyCells) {currentCell = currentRow.createCell(cellIndex);setCellValue(currentCell, cellValue);}}}return sheet;}
public ISheet Build(){ISheet sheet = (sheetName == null) ? workbook.CreateSheet() : workbook.CreateSheet(sheetName);IRow currentRow = null;ICell currentCell = null;for (int rowIndex = 0; rowIndex < cells.Length; ++rowIndex){Object[] rowArray = cells[rowIndex];currentRow = sheet.CreateRow(rowIndex);for (int cellIndex = 0; cellIndex < rowArray.Length; ++cellIndex){Object cellValue = rowArray[cellIndex];if (cellValue != null || shouldCreateEmptyCells){currentCell = currentRow.CreateCell(cellIndex);SetCellValue(currentCell, cellValue);}}}return sheet;}