This is a static copy of a profile report

Home

UsesWorksheet>UsesWorksheet.openBook (Calls: 2, Time: 0.012 s)
Generated 04-Jun-2021 04:11:08 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\io\spreadsheet\+matlab\+io\+internal\+functions\UsesWorksheet.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...etectImportOptionsSpreadsheet.executeclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
26
obj.WorkbookObj = createWorkbo...
20.011 s91.5%
39
obj.IsComObject = obj.Workbook...
20.000 s2.0%
19
if isempty(sheet)
20.000 s1.9%
40
end
20.000 s0.0%
23
if isempty(UseExcel)
20.000 s0.0%
All other lines  0.001 s4.6%
Totals  0.012 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
createWorkbookfunction20.010 s86.9%
Self time (built-ins, overhead, etc.)  0.002 s13.1%
Totals  0.012 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function26
Non-code lines (comments, blank lines)5
Code lines (lines that can run)21
Code lines that did run10
Code lines that did not run11
Coverage (did run/can run)47.62 %
Function listing
time 
Calls 
 line
  15 
        function openBook(obj,filename, sheet, fmt, UseExcel)
  16 
            import matlab.io.spreadsheet.internal.*;
< 0.001 
      2 
  17
            try 
  18 
                % By default load only the first sheet
< 0.001 
      2 
  19
                if isempty(sheet) 
< 0.001 
      2 
  20
                    sheet = 1; 
< 0.001 
      2 
  21
                end 
  22 
                % Use LibXL by default
< 0.001 
      2 
  23
                if isempty(UseExcel) 
  24 
                    UseExcel = false;
< 0.001 
      2 
  25
                end 
  0.011 
      2 
  26
                obj.WorkbookObj = createWorkbook(fmt,filename,UseExcel,sheet); 
  27 
            catch ME
  28 
                if any(ME.identifier == ["MATLAB:spreadsheet:book:chartsheetError", ...
  29 
                        "MATLAB:spreadsheet:book:invalidFormatUnix"]) || ~ispc
  30 
                    rethrow(ME);
  31 
                else
  32 
                    if ~isempty(sheet)
  33 
                        sheet = '';
  34 
                    end
  35 
                    obj.WorkbookObj = createWorkbook(fmt,filename,true,sheet);
  36 
                end
< 0.001 
      2 
  37
            end 
  38 
            % .ods and .xlsb files are interactive. Therefore, they require the use of an Excel COM server to be read properly.
< 0.001 
      2 
  39
            obj.IsComObject = obj.WorkbookObj.Interactive; 
< 0.001 
      2 
  40
        end 

Other subfunctions in this file are not included in this listing.