private static HSSFWorkbook generateExcelTableModel( FacesContext facesContext, HtmlDataTable dataTable) { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet(dataTable.getId()); List columns = getColumns(dataTable); int currentRowIndex = dataTable.getRowIndex(); addColumnHeaders(sheet, columns); generateTableContent(facesContext, sheet, columns, dataTable); dataTable.setRowIndex(currentRowIndex); return workbook; } }
private HSSFWorkbook generateExcel(FacesContext facesContext, HtmlDataTable table) { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet(table.getId()); List columns = getColumns(table); int currentRowIndex = table.getRowIndex(); addColumnHeaders(sheet, columns); addColumnValues(sheet, columns, table); table.setRowIndex( currentRowIndex ); return workbook; }
private static HSSFWorkbook generateExcelTableModel( FacesContext facesContext, HtmlDataTable dataTable) { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet(dataTable.getId()); List columns = getColumns(dataTable); int currentRowIndex = dataTable.getRowIndex(); addColumnHeaders(sheet, columns); generateTableContent(facesContext, sheet, columns, dataTable); dataTable.setRowIndex(currentRowIndex); return workbook; } }
currentRowIndex = dataTable.getRowIndex();
currentRowIndex = dataTable.getRowIndex();