Home  >  Q&A  >  body text

java - How to use POI to prohibit users from adding sheets in EXCEL

Excel generated by POI can add sheets. How to disable this function
In addition, how to use POI to only allow users to modify the style of the table but not the content of the table

给我你的怀抱给我你的怀抱2713 days ago732

reply all(1)I'll reply

  • 为情所困

    为情所困2017-05-17 10:03:18

    Do you want to prevent the cell value from being modified? You can set itCellStyle

    CellStyle unlockedCellStyle = wb.createCellStyle();
    unlockedCellStyle.setLocked(true); 
    cell.setCellStyle(unlockedCellStyle);

    reply
    0
  • Cancelreply