From e9a9946856de1cc7e46f172e7a992fb597ad1202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=89=91=E6=B3=A2?= <940930034@qq.com> Date: Tue, 25 Aug 2020 19:57:07 +0800 Subject: [PATCH] Fixed multiple cell throw exception. --- source/worksheet/range_reference.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/worksheet/range_reference.cpp b/source/worksheet/range_reference.cpp index 490cac55..5f8091ee 100644 --- a/source/worksheet/range_reference.cpp +++ b/source/worksheet/range_reference.cpp @@ -49,7 +49,15 @@ range_reference::range_reference(const char *range_string) range_reference::range_reference(const std::string &range_string) : top_left_("A1"), bottom_right_("A1") { - auto colon_index = range_string.find(':'); + auto colon_index = range_string.find(' '); + + if (colon_index != std::string::npos) + { + // Multiple cell selection is not supported at this time. + return; + } + + colon_index = range_string.find(':'); if (colon_index != std::string::npos) {