Clear Filters
Clear Filters

save an excel file to be read only

2 views (last 30 days)
Yona
Yona on 7 Dec 2014
Commented: Yona on 8 Dec 2014
can we save data on excel file (by xlswrite function or other way) and define the file to be read-only from matlab?

Accepted Answer

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

More Answers (1)

dpb
dpb on 7 Dec 2014
Inside Excel means using COM; you can use ! operator to shell OS command and set the ReadOnly file attribute for OS protection.
  1 Comment
Yona
Yona on 8 Dec 2014
thank for the answer, i prefer using Jan way.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!