Closed barthoukes closed 4 years ago
I'm migrating from xlsxwriter to your program because I also need to read xlsx. My first attempt already crashes in the second line of code at create_sheet. What is wrong with my code? I'm using 1.5.0, which builds perfect on Ubuntu.
xlnt::workbook m_workbook; void CexcelWriter::createWorkSheet(const std::string &worksheetName) { if ( m_workbook.contains(worksheetName)) { m_worksheet = m_workbook.sheet_by_title(worksheetName); } else { xlnt::worksheet worksheet = m_workbook.create_sheet(); <== throw error ???? worksheet.title(worksheetName); }
ERROR, which does not ring a bell:
terminate called after throwing an instance of 'xlnt::key_not_found' what(): xlnt::exception : key not found in container
Somehow, if I create the worksheet when I need it ( std::shared_ptr ) instead of adding a class member, then it's working and I see the excel sheet.
I'm migrating from xlsxwriter to your program because I also need to read xlsx. My first attempt already crashes in the second line of code at create_sheet. What is wrong with my code? I'm using 1.5.0, which builds perfect on Ubuntu.
ERROR, which does not ring a bell: