Closed xingyun86 closed 1 year ago
打开一个xlsx文件时,报错 "sizes don't match"。xlsx内部是有图片,还有多种合并单元格并用的。 跟踪代码发现一下代码(注释那里报错)。注释后目前运行正常。请作者给与一个检查或者更好的解决方案。
source\detail\serialization\xlsx_consumer.cpp:2099
{ expect_start_element(qn("spreadsheetml", "sst"), xml::content::complex); skip_attributes({"count"}); bool has_unique_count = false; std::size_t unique_count = 0; if (parser().attribute_present("uniqueCount")) { has_unique_count = true; unique_count = parser().attribute<std::size_t>("uniqueCount"); } while (in_element(qn("spreadsheetml", "sst"))) { expect_start_element(qn("spreadsheetml", "si"), xml::content::complex); auto rt = read_rich_text(qn("spreadsheetml", "si")); target_.add_shared_string(rt); expect_end_element(qn("spreadsheetml", "si")); } expect_end_element(qn("spreadsheetml", "sst")); //if (has_unique_count && unique_count != target_.shared_strings().size()) //{ // throw invalid_file("sizes don't match"); //} }
I am sorry. Dev version had repaired it ago.
打开一个xlsx文件时,报错 "sizes don't match"。xlsx内部是有图片,还有多种合并单元格并用的。 跟踪代码发现一下代码(注释那里报错)。注释后目前运行正常。请作者给与一个检查或者更好的解决方案。
source\detail\serialization\xlsx_consumer.cpp:2099