time | Calls | line |
---|
| | 125 | function book = constructWorkbook(format, filename, tryInterop, sheet, sheetNamesOnly)
|
< 0.001 | 2 | 126 | if sheetNamesOnly
|
| | 127 | book = matlab.io.spreadsheet.internal.Workbook(format, filename, false, 0, true);
|
< 0.001 | 2 | 128 | elseif isempty(sheet)
|
| | 129 | book = matlab.io.spreadsheet.internal.Workbook(format, filename, tryInterop);
|
< 0.001 | 2 | 130 | else
|
0.007 | 2 | 131 | book = matlab.io.spreadsheet.internal.Workbook(format, filename, false, sheet);
|
< 0.001 | 2 | 132 | try
|
| | 133 | % for chart sheets, SheetNames is not a property on the workbook
|
< 0.001 | 2 | 134 | if any(ismissing(book.SheetNames))
|
| | 135 | % this could happen with hidden sheets in the workbook that
|
| | 136 | % could cause only the hidden sheet to be loaded and all other
|
| | 137 | % sheets are missing
|
| | 138 | book = matlab.io.spreadsheet.internal.Workbook(format, filename, tryInterop);
|
< 0.001 | 2 | 139 | end
|
| | 140 | catch ME
|
| | 141 | throw(ME);
|
< 0.001 | 2 | 142 | end
|
| 2 | 143 | end
|
< 0.001 | 2 | 144 | end
|
Other subfunctions in this file are not included in this listing.