HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook .createSheet (sheetName );
// header
HSSFRow row = sheet. createRow( 0);
sheet. addMergedRegion (new Region(( int) 0 , ( short )0 , ( int) 1, (short )0 )); //번호
sheet. addMergedRegion (new Region(( int) 0 , ( short )1 , ( int) 1, (short )1 )); //이름
sheet. addMergedRegion (new Region(( int) 0 , ( short )2 , ( int) 1, (short )2 )); //소속
sheet. addMergedRegion (new Region(( int) 0 , ( short )3 , ( int) 1, (short )3 )); //훈련기간
sheet. addMergedRegion (new Region(( int) 0 , ( short )4 , ( int) 1, (short )4 )); //수강료
sheet. addMergedRegion (new Region(( int) 0 , ( short )5 , ( int) 0, (short )10 )); //성적세부사항
sheet. addMergedRegion (new Region(( int) 0 , ( short )11 , ( int) 1, (short )11 )); //진도
sheet. addMergedRegion (new Region(( int) 0 , ( short )12 , ( int) 1, (short )12 )); //평점
sheet. addMergedRegion (new Region(( int) 0 , ( short )13 , ( int) 1, (short )13 )); //수료여부
row. createCell( 0). setCellValue (new HSSFRichTextString ("번호"));
row. createCell( 1). setCellValue (new HSSFRichTextString ("이름" ));
row. createCell( 2). setCellValue (new HSSFRichTextString ("소속" ));
row. createCell( 3). setCellValue (new HSSFRichTextString ("훈련기간"));
row. createCell( 4). setCellValue (new HSSFRichTextString ("수강료" ));
row. createCell( 5). setCellValue (new HSSFRichTextString ("성적세부사항" ));
row. createCell( 11). setCellValue (new HSSFRichTextString ("진도" ));
row. createCell( 12). setCellValue (new HSSFRichTextString ("평점" ));
row. createCell( 13). setCellValue (new HSSFRichTextString ("수료여부" ));
row = sheet. createRow( 1);
row. createCell( 5). setCellValue (new HSSFRichTextString ("시험" ));
row. createCell( 6). setCellValue (new HSSFRichTextString ("과제" ));
row. createCell (7 ).setCellValue ( new HSSFRichTextString ("퀴즈" ));
row. createCell( 8). setCellValue (new HSSFRichTextString ("토론" ));
row. createCell( 9). setCellValue (new HSSFRichTextString ("참여" ));
row. createCell( 10). setCellValue (new HSSFRichTextString ("가산점" ));
번호 |
이름 |
소속 |
훈련기간 |
수강료 |
성적세부사항 |
진도 |
평점 |
수료여부 |
|||||
시험 |
과제 |
퀴즈 |
토론 |
참여 |
가산점 |
'Programming > java' 카테고리의 다른 글
[cache] cache 개념 (0) | 2014.09.26 |
---|---|
controller 에서 return json 타입 (0) | 2014.09.23 |
POI(엑셀라이브러리) (0) | 2014.02.20 |
itext 를 이용한 PDF 파일 만들기 (0) | 2013.10.22 |
도메인 명 알아내기 (0) | 2013.06.04 |