save an excel file to be read only

1 vue (au cours des 30 derniers jours)
Yona
Yona le 7 Déc 2014
Commenté : Yona le 8 Déc 2014
can we save data on excel file (by xlswrite function or other way) and define the file to be read-only from matlab?

Réponse acceptée

Jan
Jan le 7 Déc 2014
Use this:
fileattrib(FileName, '-w')

Plus de réponses (1)

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

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by