100101102103104105106107108109110
} // Column auto-sizing for (columnIndex = 0; columnIndex < table.getLastHeaderRow().getColumns(ReservedFormat.ALL, ReservedFormat.XLS).size(); columnIndex++) { if (exportConf.getAutoSize()) { sheet.autoSizeColumn(columnIndex); } } workbook.write(output);
230231232233234235236237238239240
ConditionSheetItem.NULL_VALUE_CONDITION.getCol()); // カラム幅の調整 for (int i = 0; i <= maxColumn + 1; i++) { sheet.autoSizeColumn(i); } return sheet; } private int configureColumns(HSSFSheet sheet, int startRow) {
448449450451452453454455456457
} } } // カラム幅の調整 for (int i = 0; i < columnInfos.length; i++) { sheet.autoSizeColumn(i); } return sheet; } }
104105106107108109110111112113114
} } } for (int columnIndex=0; columnIndex < model.getColumnCount(); columnIndex++){ sheet.autoSizeColumn(columnIndex); } File file = instructions.getFile(); try { FileOutputStream fileOutputStream = new FileOutputStream(file);
exportTableHeader(table, sheet, context); exportTableBody(table, sheet, context); int count = 0; while (count <= table.getColumnList().size()) { sheet.autoSizeColumn(count++); } wb.write(output); }
107108109110111112113114115116117
116117118119120121122123124125126
cell.setCellStyle(style); int lastCol = sheet.rowIterator().next().getLastCellNum() - 1; for (int i = 0; i <= lastCol; i++) { sheet.autoSizeColumn(i); } for (Row row : sheet) { row.removeCell(row.getCell(lastCol)); }
276277278279280281282283284285286
} } for (int column = 1; column <= numberOfColumns; column++) { sheet.autoSizeColumn((int) (column - 1)); } if (recordNumber > 0) { try
275276277278279280281282283284285
759760761762763764765766767768769
} /** * Print setup */ xlsSheet.autoSizeColumn((short) 0); HSSFPrintSetup printSetup = xlsSheet.getPrintSetup(); printSetup.setHResolution(sheetResolution); printSetup.setVResolution(sheetResolution);