xlsprotect

Protects/Unprotects Selected Sheet/Workbook with protection options.
4.5K Downloads
Updated 30 Nov 2004

View License

SYNTAX

xlsprotect(file,'protect_file',pwd2open,pwd2modify,read_only_recommended,create_backup)

xlsprotect(file,'unprotect_file',pwd2open)
xlsprotect(file,'unprotect_file',pwd2open,pwd2modify)

xlsprotect(file,'protect_sheet',sheetname,password)
xlsprotect(file,'protect_sheet',sheetname,password,s_options)
xlsprotect(file,'protect_sheet',sheetname,s_options)
xlsprotect(file,'protect_sheet',sheetname)

xlsprotect(file,'unprotect_sheet',sheetname)
xlsprotect(file,'unprotect_sheet',sheetname,password)

xlsprotect(file,'protect_workbook',password)
xlsprotect(file,'protect_workbook')

xlsprotect(file,'unprotect_workbook')
xlsprotect(file,'unprotect_workbook',password)

Cite As

Fahad Al Mahmood (2026). xlsprotect (https://www.mathworks.com/matlabcentral/fileexchange/6046-xlsprotect), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0

Added File Protection Option