diff --git a/source/workbook/workbook.cpp b/source/workbook/workbook.cpp index d0429714..4319d706 100644 --- a/source/workbook/workbook.cpp +++ b/source/workbook/workbook.cpp @@ -93,7 +93,7 @@ workbook::workbook(encoding e) : workbook() d_->encoding_ = e; } -worksheet workbook::get_sheet_by_name(const std::string &name) +const worksheet workbook::get_sheet_by_name(const std::string &name) const { for (auto &impl : d_->worksheets_) { @@ -106,6 +106,11 @@ worksheet workbook::get_sheet_by_name(const std::string &name) return worksheet(); } +worksheet workbook::get_sheet_by_name(const std::string &name) +{ + return worksheet(static_cast(this)->get_sheet_by_name(name)); +} + worksheet workbook::get_sheet_by_index(std::size_t index) { return worksheet(&d_->worksheets_[index]);