save an excel file to be read only

2 visualizaciones (últimos 30 días)
Yona
Yona el 7 de Dic. de 2014
Comentada: Yona el 8 de Dic. de 2014
can we save data on excel file (by xlswrite function or other way) and define the file to be read-only from matlab?

Respuesta aceptada

Jan
Jan el 7 de Dic. de 2014
Use this:
fileattrib(FileName, '-w')

Más respuestas (1)

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

Iniciar sesión para comentar.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by