Excel 锁定的单元格

Excel Locked Cells

所以我有一个工作表,我已经导出并轻松设置了格式,而无需来自 SharePoint 的代码。我有我想要锁定的单元格 A11 到 R11,所以当我刷新列宽时,当我换行文本时,列宽不会恢复正常。任何帮助将不胜感激。

我知道可能必须使用 VBA,如果是这样,我希望能详细说明一下原因。

以下内容将阻止调整某些列宽:

1. Select all the cells
2. Right click and choose Format Cells
3. Go to Protection tab and uncheck Locked
4. Select the columns you want to lock and repeat steps 1-3 above (this time check Locked)
5. Go to Review tab and deselect Select Locked Cells.
6. Click okay

这应该适合你。