Hi, I apologize for taking a long time to answer - I had problems with free time. You probably need a solution something like this: #include <map> #include <string> #include <Xlsx/Workbook.h> using namespace SimpleXlsx; class CWrapper { public: // create a sheet void AddSheet( const std::string & sheetTitle ) { CWorksheet & Sheet = m_book.AddSheet( sheetTitle ); m_Sheets[ sheetTitle ] = & Sheet; } // add data to the created sheet void AddData( const std::string & sheetTitle, int data ) { std::map<...
Hi, Thank you for your offer. Can you explain in more detail what is difficult about creating your wrapper class? Now you can create a worksheet using the CWorkbook::AddSheet method and get a reference to the new CWorksheet (you can get a pointer from this reference). This reference to the CWorksheet (and the pointer obtained from it) is correct until the end of the life of the CWorkbook object or the save of the workbook. This library was originally designed to fast save large amounts of data. Because...
Ok, thanks for understanding. If you have any difficulties with modifying the library, write here, I will try to help.
Thank you for the research and its detailed description. In general, you have discovered what E.Naumovich and I wrote about earlier. I think its OK to use 999999 to avoid recalculation due to newer Excel client program version. I think it's a dirty hack. Today it can work, and tomorrow an Excel update will be released with a detailed check of this value and when opening the file, a message will appear that the xlsx file is corrupted. It is not necessary to assume that Excel does not check parameter...
"...but there are no guarantee concerning third party software. I have strange issues with some." Is this software available for free? Can you provide examples of such software and corresponding xlsx files? I'm trying to improve the compatibility of the files generated by SimpleXlsxWriter. It may be possible to improve this situation further.
Hello everyone and thanks to Alexander Arkhipov for the detailed description of the problem. E.Naumovich is right with the cause and, I think, right with the proposed solution. The fact is that Excel saves a cache with the results of formula calculations in the xlsx file. This is necessary to speed up the work. SimpleXlsxWriter does not contain a formula calculator and does not fill in the corresponding cache in the xlsx file. There are no plans to add a formula calculator to the library yet. Therefore,...
Tony, thanks for testing. E.Naumovich, thank you for solution using the ScratchTable.
Hi, Thanks for the good question! :-) I was waiting for a response from Tony and forgot to post the release. Done. Thank you for reminding!