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 

分类:

技术点:

相关文章:

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