poi3.10 excel xls 设置列宽行高背景色加粗
poi excel xls格式 设置列宽行高背景色加粗HSSFWorkbook wb = new HSSFWorkbook(); Sheet sheet = wb.createSheet("sheet1");HSSFCellStyle style = wb.createCellStyle(); style.setFillForegroundColor(IndexedColors.LIGHT_TURQUOISE.getIndex());//背景色 style.setFillPattern(CellStyle.SOLID_FOREGROUND); HSSFFont font = wb.createFont(); font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);// 加粗 style.setFont(font);sheet.setDefaultColumnWidth(16); sheet.setDefaultRowHeight((short)400);