MATLAB: Save an excel file to be read only

MATLABread-onlyxlswrite

can we save data on excel file (by xlswrite function or other way) and define the file to be read-only from matlab?

Best Answer

Use this:
fileattrib(FileName, '-w')