excel读取优化
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ endif()
|
||||
|
||||
if(MSVC)
|
||||
# 关闭 /showIncludes
|
||||
string(REPLACE "/showIncludes" "" CMAKE_DEPFILE_FLAGS_C "${CMAKE_DEPFILE_FLAGS_C}")
|
||||
string(REPLACE "/showIncludes" "" CMAKE_DEPFILE_FLAGS_CXX "${CMAKE_DEPFILE_FLAGS_CXX}")
|
||||
# string(REPLACE "/showIncludes" "" CMAKE_DEPFILE_FLAGS_C "${CMAKE_DEPFILE_FLAGS_C}")
|
||||
# string(REPLACE "/showIncludes" "" CMAKE_DEPFILE_FLAGS_CXX "${CMAKE_DEPFILE_FLAGS_CXX}")
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
|
||||
@@ -36,6 +36,11 @@ bool Read(std::string_view path_name, Vector2<std::string, size_t>& ret)
|
||||
//log("Sheet: " + sheet_name);
|
||||
XLWorksheet sheet = workbook.worksheet(sheet_name);
|
||||
uint16_t count_x = sheet.columnCount();
|
||||
if (count_x >= 16384)
|
||||
{
|
||||
log_err("文件列数 >= 16384,请检查文件:{}", path_name);
|
||||
return false;
|
||||
}
|
||||
uint32_t count_y = sheet.rowCount();
|
||||
ret.Resize(toSizeT(count_x, 0));
|
||||
for (uint32_t y = 0; y < count_y; ++y)
|
||||
|
||||
Reference in New Issue
Block a user