将单元格组设置为true [英] Set lock true for group of cells

查看:247
本文介绍了将单元格组设置为true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用closedxml使用下面的函数来导出EXCEL ..

I'm using closedxml to export excel..

现在我可以保护(锁定的细胞)细胞,

Now i can protect (Lock cell) cell using the following function,

workSheet.Cell(rowIndex,column).Style.Protection.SetLocked(true);



我想设置的细胞群..
是可能的在closedxml?

I want to set group of cells.. Is that Possible in closedxml ?

推荐答案

您可以使用范围像这样

workSheet.Range(startRow, startColumn, endRow, endColumn).Style.Protection.SetLocked(true);

这篇关于将单元格组设置为true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆