How to locked/unlocked cells in an Excel file?

3 visualizaciones (últimos 30 días)
Jurij Rici
Jurij Rici el 21 de Ag. de 2024
Comentada: Image Analyst el 21 de Ag. de 2024
Dear,
how can I lock/unlock cells in Excell file?
For example: file = 'Fruits.xlsx', Sheet = 'Apple', Range = 'B4:B10'.
How is possible to lock the cells in range 'B4:B10' in my file and my sheet? The file and the sheet are unprotected.
Thank you very much? Jurij Rici

Respuestas (1)

dpb
dpb el 21 de Ag. de 2024
You'll have to use Excel COM. The <Link to Excel Locked Property> gives the syntax; you merely set the range .Locked property to true/false.
  1 comentario
Image Analyst
Image Analyst el 21 de Ag. de 2024
Some files that may help are attached. Good luck. These use ActiveX so require Windows, not mac iOS.

Iniciar sesión para comentar.

Categorías

Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by