xlsread with protected sheets

Does xlsread have any trouble reading protected excel sheets?
Thanks!

댓글 수: 1

Caroline
Caroline 2013년 8월 22일
And if it does, is there anyway to unprotect them in MATLAB?

댓글을 달려면 로그인하십시오.

 채택된 답변

the cyclist
the cyclist 2013년 8월 22일

1 개 추천

There is a very old file in the File Exchange that claims to be able to protect/unprotect Excel files: http://www.mathworks.com/matlabcentral/fileexchange/6046-xlsprotect
Here is a thread on the older MATLAB newsgroup forum about this function: http://www.mathworks.com/matlabcentral/newsreader/view_thread/98978

댓글 수: 3

Caroline
Caroline 2013년 8월 22일
Thank you for answering me! Do you know where you have to put this file in your MATLAB directory in order for it to work?
Thanks again!
MATLAB has a "search path" where it looks for commands. You can type
path
to see what it is. The file can go anywhere in the search path.
Perhaps easiest is to put it in the top-level MATLAB directory.
Caroline
Caroline 2013년 8월 22일
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

ES
ES 2013년 8월 23일

0 개 추천

xlsread is very limited. Create Excel Com objects from Matlab using ActiveX. It has every feature of matlab.
%Create Excel Sheet Object for the sheet objExcel = actxserver('Excel.Application'); objExcelS=objExcel.Workbooks.Open(fullfile(ExcelFilePath, ExcelFileName)); objExcelS.Protect. %Protection on off for current sheet
% Delete the COM object. objExcel.ActiveWorkbook.Save; objExcel.ActiveWorkbook.Close; objExcel.Quit; objExcel.delete;
Now the excel protection can be removed and xlsread can be done. Else data can be read by using the com object itself.

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

질문:

2013년 8월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by