save an excel file to be read only

2 次查看(过去 30 天)
can we save data on excel file (by xlswrite function or other way) and define the file to be read-only from matlab?

采纳的回答

Jan
Jan 2014-12-7
Use this:
fileattrib(FileName, '-w')

更多回答(1 个)

dpb
dpb 2014-12-7
Inside Excel means using COM; you can use ! operator to shell OS command and set the ReadOnly file attribute for OS protection.

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by