%

% Copyright 2017 The MathWorks, Inc.
function dataStart = getDataRangeStart(this, M)
    assert(~isempty(M));
    if strlength(this.Range) > 0
        rnge = string(this.Range);
    else
        rnge = this.DefaultCell;
    end
    options = ["ignorecase", "tokens", "once"];
    rx = "^([a-z]+)(\d+)";
    value = regexp(rnge, rx, options{:});
    if numel(value) < 2
        error(message('sl_xls:WriteTable:InvalidRange', rnge));
    end
    % add size of metadata table to get range start point
    value(2) = str2double(value(2)) + size(M, 1);
    dataStart = value.join("");
end
