试试这个:这里
Row row = sheet.createRow(2);Cell cell = row.createCell(2);cell.setCellValue("Use n with word wrap on to create a new line");//to enable newlines you need set a cell styles with wrap=trueCellStyle cs = wb.createCellStyle();cs.setWrapText(true);cell.setCellStyle(cs);


