๋ณํฉํ๋ ๋ฐฉ๋ฒ ๊ธฐ๋ก
CellRangeAddress region1 = new CellRangeAddress(0,0,1,2);
sheet.addMergedRegion(region1);
CellRangeAddress region2 = new CellRangeAddress(0,0,3,4);
sheet.addMergedRegion(region2);
CellRangeAddress region3 = new CellRangeAddress(0,0,5,6);
sheet.addMergedRegion(region3);
CellRangeAddress region4 = new CellRangeAddress(0,1,0,0);
sheet.addMergedRegion(region4);
Row row = sheet.createRow(0);
Row bottomRow = sheet.createRow(1);
final String[] headers = {"์๋น์ค", "ํด์ง์ ์ฒญ","", "ํด์ง","", "์ค๋จ",""};
final String[] subHeaders = {"", "๊ฑด์", "์ง์ ์ ๋งค์ถ", "๊ฑด์", "์ง์ ์ ๋งค์ถ", "๊ฑด์", "์ง์ ์ ๋งค์ถ"};
int cellNum = 0;
int bottomCellNum = 0;
for (String header : headers) {
Cell cell = row.createCell(cellNum++);
cell.setCellValue(header);
}
for (String subHeader : subHeaders) {
Cell bottomCell = bottomRow.createCell(bottomCellNum++);
bottomCell.setCellValue(subHeader);
}
๋ฐ์ํ
'๊ธฐํ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๊ฐ์๊ธฐ ์ ๋์ฝ๋ (0) | 2023.07.02 |
---|---|
์ปดํจํ ์ฌ๊ณ ํ๊ธฐ (0) | 2023.04.07 |
FCM PUSH(IOS) - Java HTTP v1 ์ฌ์ฉํ์ฌ PUSH ์๋ฆผ ์ ์ฉํ๊ธฐ (0) | 2021.01.20 |