xlsread with protected sheets
Ältere Kommentare anzeigen
Does xlsread have any trouble reading protected excel sheets?
Thanks!
1 Kommentar
Caroline
am 22 Aug. 2013
Akzeptierte Antwort
Weitere Antworten (1)
ES
am 23 Aug. 2013
0 Stimmen
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.
Kategorien
Mehr zu Environment and Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!