如何使用 .Net 以只读格式保存 .xlsm 文件
如何使用 .Net 代码将我的 .xlsm
文件以只读格式保存在共享驱动器中。当我打开它时,它显示为只读。但保存后,当我打开时,我可以编辑。
我需要在保存时采用只读格式。请帮忙。
How do I save my .xlsm
file in read-only format in a shared drive using .Net code. When I open it is showing as read-only. But after saving, when I open I was able to edit.
I need to have read-only format while saving. please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
中 File 对象的 IsReadOnly 属性
使用msdn (http ://msdn.microsoft.com/en-us/library/system.io.fileinfo.isreadonly.aspx):
Use the IsReadOnly property on the File object
from the msdn (http://msdn.microsoft.com/en-us/library/system.io.fileinfo.isreadonly.aspx):