OpenXLSX icon indicating copy to clipboard operation
OpenXLSX copied to clipboard

load different document in different thread

Open iamtangxin opened this issue 1 year ago • 0 comments

hi there, i have many xlsx files to read, so i load different document in different thread, each thread has a OpenXLSX::XLDocument object, and got the exception "bad allocation", i was confused, is that expected? OpenXLSX branch: master Env: VS2019 WIN32 here is my code:

auto doc = std::make_unique<OpenXLSX::XLDocument>();
try
{
    doc->open(path);
}
catch (std::exception& e)
{
    LogError() << "open excel(" << path << ") failed: " << e.what(); // catch exception: bad allocation
    return -1;
}

iamtangxin avatar Jun 05 '23 07:06 iamtangxin