XSSFCreationHelper richTextFactory = workbook.getCreationHelper();
XSSFDrawing drawing = sheet.createDrawingPatriarch();
XSSFClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 5, 10, 8, 15);
XSSFComment comment = drawing.createCellComment((ClientAnchor)anchor);
String text = "띄어쓰기 없이 이렇게만 입력해 주세요. 숫자만 입력해 주세요.";
XSSFRichTextString rtf1 = richTextFactory.createRichTextString(text);
comment.setString((RichTextString)rtf1);
로 생성후 메모가 보여질 위치에 하단의 코드를 삽입.
cell.setCellComment((Comment)comment);
결과화면
'개발 > BackEnd' 카테고리의 다른 글
내가 보려고 쓰는 페이징유틸(PagingUtil) (1) | 2023.12.27 |
---|---|
poi HSSF 사용시 Excel DropDownListBox 사용 (java 엑셀 드롭다운, 셀렉트박스) (0) | 2023.04.28 |
트랜잭션(Transaction)처리 하기 (0) | 2022.01.26 |
The maximum column width for an individual cell is 255 characters. 엑셀 다운로드시 Error (0) | 2021.10.01 |