Activity for SimpleXlsxWriter

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Hi, CMake 4 looks like dont want to recognize cmake_minimum_required(VERSION 2.8) in CMakeLists.txt with strange error message. I replaced it with cmake_minimum_required (VERSION 3.15) It works.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    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<...

  • pogzy pogzy posted a comment on discussion General Discussion

    Hi, I've tried to create a wrapper class with // create a sheet AddSheet(std::string sheetTitle); // add data to the created sheet AddData(std::string sheetTitle, std::map<std::string, std::vector\<std::string="">> data); // to close and save the file saveFile(std::string fileName);</std::string,> But doing this, it was impossible due to compiler error that requires some default constructor for CWorksheet. I am using VS 2022 and impossible to find any way to do this done. "Now you can create a worksheet...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    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...

  • pogzy pogzy posted a comment on discussion General Discussion

    Hi, This lib seems very promising and quite complete. I've added a little function in WorkBook.h: CWorksheet * GetSheetByName(std::string title) { for ( size_t i = 0; i < m_worksheets.size(); i++ ) if ( title == m_worksheets[ i ]->GetTitle().toStdString() ) return m_worksheets[ i ]; } Without it, I didn't find any way to create a wrapper class with a constructor that build the workbook, a functions that add a sheet and another that add data. All provided samples are monolithic code bloc, which seems...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Ok, thanks for understanding. If you have any difficulties with modifying the library, write here, I will try to help.

  • Alexander Arkhipov Alexander Arkhipov posted a comment on discussion General Discussion

    Ok i understand your point. But my small project uses just formulas of type "=SUM("A1:C1")" so i will make some patches to calculate resulting value and store it.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    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...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcPr calcId="124519"/> saved <calcPr calcId="145621"/> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcPr calcId="124519"/> saved <calcPr calcId="145621"/> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcPr calcId="124519"/> saved <calcPr calcId="145621"/> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov modified a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml original <calcpr calcid="124519"> saved <calcpr calcid="145621"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid recalculation...

  • Alexander Arkhipov Alexander Arkhipov posted a comment on discussion General Discussion

    Today i got some free time to investigate problem further. I created my test 1.xlsx with SimpleXlsxWriter, copyed it, and saved using excel (i am using excel 2010). Then i compared changes between these two files: It appears that they differs in two files: .xlsx\xl\workbook.xml * original <calcpr calcid="124519"> * saved <calcpr calcid=" *145621*"> According to this calcid is a formulas engine id, if its lower than current, document formulas are recalculated. I think its OK to use 999999 to avoid...

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    This is commercial software, and producer is not very cooperative in such matters. There are chances that issue related to the resolved problem of the actual size of the sheet, but I cannot prove it at that moment. It looked like this: I create new project in this software, it is using number of the xlsx files to fetch data. At creation everything looks fine. But if I save project and than reopen, it cannot fetch data again. So I started re-save xlsx automatically and insisted other users to do ...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    "...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.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    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,...

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    In general better to re-save generated file from Excel. There are no problems with reading for the Excel , but there are no guarantee concerning third party software. I have strange issues with some. 100% implementation of the xlsx for me looks problematic, however it is question to Alexandr Belyak.

  • Alexander Arkhipov Alexander Arkhipov posted a comment on discussion General Discussion

    It is possible, but i have to do it every time? Can it be fixed?

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Very likely it is an issue of the not-100% implementation of the Excel internal structures in generated file. When Excel opens generated file, it prepared these structures automatically and then wants to save them. In you case it might be result of the formula calculation. My suggestion is to save generated file from Excel if possible.

  • Alexander Arkhipov Alexander Arkhipov posted a comment on discussion General Discussion

    Hello and thanks for excel writer library. The minimal code to reproduce the issue is this: using namespace SimpleXlsx; CWorkbook wb; CWorksheet& ws = wb.AddSheet( L"отчет" ); ws.BeginRow( 23.25 ); ws.AddCell( L"=SUM(C3:C4)" ); ws.EndRow(); wb.Save( "1.xlsx" ); It saves file, file can be opened normally, but after user closes file (no changes were made), excel asks if he should save changes. I attached example.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Tony, thanks for testing. E.Naumovich, thank you for solution using the ScratchTable.

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Simple tests show it's working ok, thanks for your efforts. I'll report back if any more issues crop up with this. Tony.

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Sorry, I've been too busy to do much. I'll download and test the new release now.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    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!

  • SimpleXlsxWriter SimpleXlsxWriter updated /Readme.txt

  • SimpleXlsxWriter SimpleXlsxWriter released /SimpleXlsx r0.41.zip

  • Alexandr Belyak Alexandr Belyak committed [62b2d9] on Code

    Removed initializing parameters for CWorksheet (since version 0.40) because found other solution.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Hi, what about next release?

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Preparing and saving of the sheet is carried out in one pass, as before. Only now, after saving the sheet to a file, this file is opened as a binary file and several bytes are replaced in it. These bytes are a string with a dimension. This method of modifying data should be fast and memory efficient.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    This turned out to be a feature of Visual Studio. Please check the updated archive.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    In case of the two-pass preparation of the sheet, usage of the memory buffer rather than file looks as more straight option.

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Sadly it's not compiling for me, Visual Studio is complaining about the following. m_UsedCellFirst.row = m_UsedCellFirst.col = std::numeric_limits< uint32_t >::max(); and m_UsedCellFirst.row = std::min( m_UsedCellFirst.row, m_row_index ); m_UsedCellFirst.col = std::min( m_UsedCellFirst.col, Col ); m_UsedCellLast.row = std::max( m_UsedCellLast.row, m_row_index ); m_UsedCellLast.col = std::max( m_UsedCellLast.col, Col ); I get the following errors. SimpleXlsx\Source\Xlsx\Worksheet.cpp(156,82): warning...

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Yes, I do read Excel sheets, that's how I discovered the problem originally. I originally tried doing exactly what you have done, but couldn't make it work reliably (the sheets were often unreadable). This is why I ended up writing to a buffer, storing the location (as you have done), then inserting the correct dimensions in the string before writing to the output stream. I'll give the 0.41 beta a test.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    It seems I have found a solution. First, "A1" is written to the dimension attribute in the XML file, then many spaces are added. Additionally, the position in the XML file is saved. This format suits for Excel 2010. After the XML file is saved, it reopens and overwrites the value of the dimension attribute. If it's not difficult, check the work of the updated library for yourself. Excel should open files correctly. Tony, do you read XML files yourself or do you use some special library for Excel...

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    I see. Implementing this would require a complete reworking for me, I'll just patch with my own mods.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    There is an example, SimpleScratch.cpp, starting from line 125. You dont need to add row, you should prepare cell with desired coordinates and than add it to clsScratchTable. clsScratchTable Tbl; clsCell cl; cl.Set(0,2,CurTime,CustomDateTimeStyleIndex); Tbl.Add(cl); cl.Set(0,1,"Entry"); Tbl.Add(cl); cl.Set(0,0,"0:0"); Tbl.Add(cl); cl.Set(2,2,"2:2"); Tbl.Add(cl); cl.Set(3,0,"0:3, Long"); Tbl.Add(cl); cl.SetLong(3,1,std::numeric_limits<int64_t>::max()); Tbl.Add(cl); size_t Nr,Nc; CWorksheet::SParams...

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    I've made a start to look at implementing this. There is actually a lot of rework to existing code to implement this, I've pretty much got to re-write everything. It's not immediately clear how to actually use it. All my existing code has things like m_Sheet->BeginRow(); m_Sheet->AddCell(value, style_id); m_Sheet->AddCell(value, style_id); m_Sheet->AddCell(value, style_id); m_Sheet->EndRow(); How would I do this with the new clsScratchTable? How do you add a new row? Thanks in advance, Tony.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Yes, these mods are already official.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    I apologize for not answering at all due to lack of free time. I think that E.Naumovich suggested the best solution and it should be the main one.

  • SimpleXlsxWriter SimpleXlsxWriter released /SimpleXlsx r0.40.zip

  • SimpleXlsxWriter SimpleXlsxWriter updated /Readme.txt

  • Alexandr Belyak Alexandr Belyak committed [6976c1] on Code

    Initializing parameters for CWorksheet and function GetDim to scratch sheet

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Will these mods be added to the offical SimpleXlsxWriter ?

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    There is a helper class, clsScratchTable, which is used to organize matrix-like filling of the xlsx. Its usage can be found in example "Samples\SimpleScratch.cpp" In general you have to open worksheet, to prepare styles for you needs, than you can make few ScratchTable's, for example one for each sheet you want to use. You can add cells to sheet, delete or replace added cell. When ScratchTable is finished, you can request its dimensions and then use them for filling xlsx file. Simple example can...

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Can you summarise what changes have been made (and how to use them)?

  • E.Naumovich E.Naumovich modified a comment on discussion General Discussion

    Dear all, please check solution using ScratchTable (see example in Samples, SimpleScratch.cpp ), and generated SimpleScratch.xlsx (with similar zip to )

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Dear all, please check solution using ScratchTable (see example in Samples, SimpleScratch.cpp ), and generates SimpleScratch.xlsx (with similar zip to )

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Yes, I understand. Is there space to have two modes? One where you allow auto calculation of the range, the other where you specify it in advance using SParams? Tony.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Thank you for your solution. It can help some people. But I will not include it in the main code, as this will contradict one of the main features of this library: "The main feature of this library is that it uses C++ standard file streams. On the one hand it results in almost unnoticeable memory and CPU resources consumption while processing (that may be very useful at saving a large data arrays), but on the other hand it makes unfeasible to edit data that were written.". Thank you again for your...

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    If it helps, I've made some changes that now give the correct range (changed files attached). It's not that elegant, but it does work and does not require the replacement of the XML writer. You're welcome to incorporate it in SimpleXlsxWriter if you want. To summarise, store the dimension tag location, write as before to a string instead of a file stream, at the end, insert the dimension tag at the correct place and write. All I've done is this. - Change the output stream into a std::stringstream,...

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Turns out it's difficult for me to work out the ranges. Would it be straightforward to configure the XMLWriter to write to a string before outputting to disk? That way you could insert the correct dimensions. The drawback would be the amount of memory required would increase.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Quick and dirty solution for the ScratchTable: void clsScratchTable::GetDim(size_t &rw, size_t & cl) const { rw=0; cl=0; for(const auto &c:Cells) if(c.priority<1){ if(c.row>rw) rw=c.row; if(c.col>cl) cl=c.col; } }; not tested yet , sorry.

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    Thanks for this. I should be able to work out the number of rows/cols before the sheet is created (even if I have to create the sheet twice to calculate the counts). One note. Would it be possible to store the position in the file where the dimensions are, and then rewind to it to insert the correct dimension? Something like the following? long nCurrentXMLWriterOffset = m_XMLWriter->GetBufferPosition(); ..magic happens... ..calculate correct dimensions... m_XMLWriter->SetWriterOffset(nCurrentXMLWriterOffset);...

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Very bold way is just to search Cells vector for max Cells[i].row Cells[i].col values for cases when Cells[i].priority<=0. I cannot do it in few days because I have some urgent business at work and my home PC is under construction.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    I think it's a good idea. If I understand correctly, then for this it is necessary to use the initial part of the clsScratchTable::InsertTo function to obtain the data area range? The CWorksheet::SParams structure may be extended in the future as many more parameters are hard-coded.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Likely it can be done using ScratchTable? Sheet should be constructed after ScratchTable became filled and required parameters might be calculated in ScratchTable.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi Tony, I tried to do automatic detection of the data area. Due to the specifics of the library implementation, the "dimension" tag was added after the data itself. This is correct for XML files, but Excel 2010 gave a message about a corrupted file. Therefore, I had only one option left - through additional parameters when creating a CWorksheet (the CWorksheet::SParams structure). To do this, you need to know the size of the data area in advance. Please check if this option is suitable for you....

  • Tony Kennedy Tony Kennedy posted a comment on discussion General Discussion

    I've got some code that reads in a XLSX file, but it relies on the "dimension" tag being correct. In CWorksheet::Init, it's hard coded to be "A1". Is there an easy way of getting this updated before the worksheet is written to disk? Thanks in advance, Tony.

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Alexandr, Am beginning to get comfortable with Xcode C++ Projects, so thank you for your support and for being patient. I did discover the ability to Create a Group of Files, which the compiler is happy to work with, which does tidy up the structure within the Project Navigator. That is the same as the solution you referred me to in you previous post, thank you. A Group of Files is grey, a Folder is blue... So I am happy to go along with this for now, SimpleXlsx is working as it should. Xcode does...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi Robert, Example "Scientific.cpp " it was created in order to show what possibilities there are for creating diagrams. I think you are right and I need to rework this example as you suggested. Thank you for your patience and the work done. Work with fonts and format can be found in "Simple.cpp ". The range of axes can be set using functions like CChart::SetXAxisMin and CChart::SetXAxisMax, CChart::SetYAxisMin and CChart::SetYAxisMax.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi Robert, Perhaps there is some feature of working with Xcode and nested directories. Maybe a similar problem is described here (see the most popular answer)? https://stackoverflow.com/questions/21958759/subfolders-in-xcode-linking #include "../UTF8Encoder.hpp" should work correctly. At least I tested it under Linux and Windows with the GCC compiler.

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    OK, I have now managed to get the Xcode C++ Project sorted: Within Xcode, I have created Groups (without Folder) which has enabled me to tidy up (and protect) the SimpleXlsx project files which the compiler clearly does understand. Previously, I had added the SimpleXlsx Folders to the Project, and it would appear the compiler was unable to properly interpret the #include "../UTF8Encoder.hpp" code. There probably is a way to rewrite the #include... in Xcode C++ to look into Folders (but I am not yet...

  • Robert McInnes Robert McInnes modified a comment on discussion General Discussion

    Alexandr, It took me a few hours to figure out (learn) what was going on in the Scatter Chart. You have created excellent examples, as a guide, as you said... To make things clearer for me, I grouped the code for each Series Line, once I had done that it all became much easier to understand. I have attached a pdf documenting Scientific.cpp AddScatterChart, code, with my added comments, and grouping, of the code by Line/Marker, to make it easier for a newby to understand the subtlety of the design....

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Alexandr, It took me a few hours to figure out (learn) what was going on in the Scatter Chart. You have created excellent examples, as a guide, as you said... To make things clearer for me, I grouped the code for each Series Line, once I had done that it all became much eaqsier to understand. I have attached a pdf documenting Scientific.cpp AddScatterChart, code, with my added comments, and grouping, of the code by Line/Marker, to make it easier for a newby to understand the subtlety of the design....

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Hi Alexander, Ooops, I should have been clearer in my earlier post. The projects in Xcode C++ are now compiling and running properly. Thanks for you help. You were right, the Compiler was not finding UTF8Encoder.hpp, PathManager.hpp, etc that are not in the subfolders of the SimpleXlsx package. When I rebuilt the Project with all the SimpleXlsx functions at the same level, the Compiler and Object Linker were happy. As I said, i do see the warnings, Documentation, Sematics etc that does not effect...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi, Thanks again for the detailed information. If it doesn't bother you, attach the compiler output here after building the project. Maybe I can eliminate some compiler warnings. If you are very concerned about compiler messages, then you can compile the library separately using CMAKE and use resulting object file to your project. It will also speed up the build of your project. I also want to note that Microsoft Excel is not required to use this library.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi, unfortunately, there is not enough time to prepare a User Guide. Excuse me. Please see the examples of using the library in the archive with the source code. If you have any questions, feel free to ask.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Hi, there is no user guide, only examples. Apropos, you dont need to duplicate color library. One is enough. If you need grayscale, just to forget about gs10_lib.

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    OK, got it: but it was a bit of a struggle/guess to sort is out... Is there a User Guide to all of this subtle stuff: I would like to change the X and Y Range and Fonts, where do I go, please... // Initialise the Color Library for the Trend Chart. XLSXColorLib cl_lib, gs10_lib; make_excell_like_named_colors( cl_lib ); make_excell_like_named_colors(gs10_lib); // Changed: was make_grayscale10( gs10_lib ); // Add the TrendData as a Line Chart to the WorkBook. AddLineChart( book, sheet, cl_lib, gs10_lib...

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    I cannot find a way to change the Line Color to other than Black or Gray(s) Get an error: terminating with uncaught exception of type std::out_of_range: map::at: key not found. Why is this, or am I missing some simple setup?

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Oh, and I forgot to mention it earlier: am working with Microsoft Excel for Mac (Version 16.61.1). I found the "successfully saved workbook" Workbook. It was buried in the Project Build folder... And it looks perfect.... /Users/rmcinnes/Library/Developer/Xcode/DerivedData/SimpleXlsx_Example-gaogkxwwiinxwhakgyuxjlafejny/Build/Products/Debug/Scientific SimpleXlsx Test.xlsx Changed the path name an now it pops up in my project folder, just fine. Again, thank for your help; if you wish to follow up to...

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Ah, I removed all refernces to the .h and .cpp files from the project, and the associated folders. Then added all the files back at the root of the project, and bingo. No complier errors, and Scientific.cpp ran to completion. Am still looking for the Excel WorkBook! Have some Buildtime issues, but no Runtime errors... (23) Semantic issues in zip.cpp "Possible miss use of comma" (10) Conversion issues, also in zip.cpp "long to unsigned int" (50) Documentation issues, the likes of which I have seen...

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Here are the 14 error I am seeing...

  • Robert McInnes Robert McInnes modified a comment on discussion General Discussion

    Yes, I can confirm that all the files have been added to the Project. I have left them in their appropriate folders, since the example Scientific.cpp is expecting to find them in the folders. I assume, reviewing the headers that this is the correct way, and Xcode C++ compiler does understand #include "../PathManager.hpp" and "XLSXColors/XLSXColorLib.h" I did not include "scratch", since I do not need matrix access. Nor Zip, but adding Zip made no differnce; still the same 14 errors.

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    Yes, I can confirm that all the files have been added to the Project. I have left them in their appropriate folders, since the example Scientific.cpp is expecting to find them in the folders. I assume that is the correct way? I did not add "scratch", since I do not need matrix access.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    It looks like the cpp files from the directories "scratch", "Xlsx", "XLSXColors" and "Zip" are not compiled. Have all cpp files been added to the Xcode C++ Project?

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    I created a new Xcode C++ Project of the Scientific.cpp, and see exactly the same errors. Am not familiar with Xcode, but could not find any object files in the" build" folder, except for "Objects-normal,x86+64,PathManager.o and Scientific.o"

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi, Thanks for your kind words and detailed explanation. It looks like the linker doesn't see the library's object files. Can you see the object files "Worksheet.o" or "Workbook.o"? Are they in the same directory as "main.o" ? Maybe they are in different directories and you need to specify them explicitly to the linker.

  • Robert McInnes Robert McInnes modified a comment on discussion General Discussion

    What an amazing package SimpleXlsxEWriter is: Great work, you guys... My first pass at a project: adding the ablity to create and pass Trend Data to an Excel Workbook. I had previously reached the point where I am able to create the data as a text file, open with Excel, and add a line chart. Next I searched for a way to write directly to Excel, and SimpleXlsxEWriter is a perfect fit... My project in Apple Xcode C++ compiles OK, no errors, but fails to link, please refer to the attached log. Any ideas,...

  • Robert McInnes Robert McInnes modified a comment on discussion General Discussion

    What an amazing package SimpleXlsxEWriter is: Great work, you guys... My first pass at a project: adding the ablity to create and pass Trend Data to an Excel Workbook. I had previously reached the point where I am able to create the data as a text file, open with Excel, and add a line chart. Next I searched for a way to write directly to Excel, and SimpleXlsxEWriter is a perfect fit... My project in Apple Xcode C++ compiles OK, no errors, but fails to link, please refer to the attached log. Any ideas,...

  • Robert McInnes Robert McInnes posted a comment on discussion General Discussion

    What an amazing package SimpleXlsxEWriter is: Great work, you guys... My first pass at a project: adding the ablity to create and pass Trend Data to an Excel Workbook. I had previously reached the point where I am able to create the data as a text file, open with Excel, and add a line chart. Next I searched for a way to write directly to Excel, and SimpleXlsxEWriter is a perfect fit... My project in Apple Xcode C++ compiles OK, no errors, but fails to link, please refer to the attached log. Any ideas,...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi, Done :-) Thanks for your help!

  • SimpleXlsxWriter SimpleXlsxWriter updated /Readme.txt

  • SimpleXlsxWriter SimpleXlsxWriter released /SimpleXlsx r0.39.zip

  • Alexandr Belyak Alexandr Belyak committed [84b4b5]

    Added scratch

  • Alexandr Belyak Alexandr Belyak committed [94d9c4]

    Redesigned function CWorkbook::Save

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Hi, I tried new version, very briefly. It looks like that this problem fixed. Thanks! I also suggest to add Scratch to CMake. Practically there are no reasons to keep it separately.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi, Sorry for the long silence for various reasons. Perhaps is the problem related to antivirus software or similar security software? Just in case, I redesigned the library to call the fclose function directly. Please check if possible.

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Hi, in my case it looked like this: I am using software which produced xlsx reports. During one session it might be generated something like 5-10 files. They might be opened in Excel, but cannot be saved because "someone else also opened them". After I close software, this problem disappears. If I'm using "book.Save( f, false )" and closing reports separately, by fclose, it also do not appear. I'm tested it with Win10 Pro 21H1, gcc 12.1 MinGW_w64 v10 UCRT 32bit (https://winlibs.com/). OS-related...

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Hi, I apologize for the long silence, I had problems accessing the site. Why did you decide that zip does not close file if it was open using handle from fopen on Windows? I tried such a simple test: CWorkbook book( "Incognito" ); ... FILE * f = fopen( "Test.xlsx", "w" ); if( f == NULL ) { std::cout << "The book saving has been failed" << std::endl; return 0; } book.Save( f, true ); std::cout << "The book has been saved successfully" << std::endl; while( true ) ; When the program is in an infinite...

  • E.Naumovich E.Naumovich posted a comment on discussion General Discussion

    Hi, looks like zip does not close file if it was open using handle from fopen on Windows. Probably it should be fopen/fclose pair, not fopen/CloseHandle. It is near line 2532 in zip.cpp file. Regards.

  • Alexandr Belyak Alexandr Belyak posted a comment on discussion General Discussion

    Добрый день! Нужно использовать NUMSTYLE_NUMERIC вместо NUMSTYLE_GENERAL.

  • Sergey Sergey posted a comment on discussion General Discussion

    Добрый день! Не получается установить точное количество знаков после запятой. Делаю так: stStyle.numFormat.numberStyle = NUMSTYLE_GENERAL; stStyle.numFormat.numberOfDigitsAfterPoint = 2; …. CellDataFlt col; col.value = db.dValue; col.style_id = i_IndStyle; sheet->AddCell(col); Результат:

1 >