wdw31210
Workbook wb = new XSSFWorkbook();   //or new HSSFWorkbook();  
   Sheet sheet = wb.createSheet();  
  
   Row row = sheet.createRow(2);  
   Cell cell = row.createCell(2);  
   cell.setCellValue("Use \n with word wrap on to create a new line");  
  

   CellStyle cs = wb.createCellStyle();  
   cs.setWrapText(true);  //关键
   cell.setCellStyle(cs);  //单元格应用设置的style 

分类:

技术点:

相关文章:

  • 2021-09-15
  • 2022-12-23
  • 2021-07-17
  • 2021-09-20
  • 2022-12-23
  • 2021-12-05
  • 2021-07-26
猜你喜欢
  • 2021-12-31
  • 2021-11-27
  • 2022-12-23
  • 2022-01-05
  • 2021-10-30
  • 2021-05-28
  • 2021-10-29
相关资源
相似解决方案