更新时间:2023-02-18 21:04:10
无法创建默认解锁的单元格;锁定是默认值.但是您通过创建一个 CellStyle
并将锁定设置为 false 是在正确的轨道上.确保将所有要解锁的新 CellStyle
对象上的锁定设置为 false.此外,Excel 对可以在 Workbook
中创建的单元格样式数量有限制,因此对每个 Cell 重复使用您的
你创建.CellStyle
对象
It is not possible to have created cells default to unlocked; locked is the default. But you are on the right track by creating a CellStyle
with locked set to false. Make sure that you set locked to false on any and all of your new CellStyle
objects that you want to be unlocked. Additionally, Excel has a limit on the number of cell styles that can be created in a Workbook
, so re-use your CellStyle
object(s) with each Cell
you create.