general problems with sample programs
C++ library for creating XLSX files for MS Excel 2007 and above.
Brought to you by:
oxod,
programmeralex
Hey,
I am trying to get the sample programms working and hope someone can help me. Every time I run one of them it prints at the console "the book saving has been failed". The building is without any errors and the worksheet which is appearing is damaged and can not be opened with excel.
Maybe anyone knows how to fix this or where the problem is located.
Thanks in advance!
Hi,
Tell me please, is the size of the xlsx-file larger than 0?
If the size is 0, then there may be a problem with access to the temporary folder.
Under Windows this folder requested via getenv( "TEMP" )
Under Unix via getenv with one of the following parameters: "TMPDIR", "TMP", "TEMP", "TEMPDIR"
Please see the constructor of CWorkbook class.
Also please specify your operating system and compiler.
Hi,
thanks for your fast answer.
The size is 22 Byte..
I am working with Eclipse Photon ( 4.8.0)
It looks like a problem with a temporary directory.
Please specify your operating system and show output of small program from attachment.
I am sorry I am quite new to C++ and Eclipse so I dont know wheather I did it right but when I build it this is the output:
"
make all
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp"
../main.cpp:22:2: error: Unsupported OS!
error Unsupported OS!
^
1 error generated.
make: *** [main.o] Error 1
"
And I am working with macOs High Sierra.
Thanks!
Sorry for the long answer, I am on a business trip now.
You did everything right. This error message is correct. The fact is that the library was never tested under macOS.
If you have the desire and time to help with testing the library under macOS, I will be very grateful to you. To do this, we may need to carry out several checks/iterations.
If you are ready to help, please show the output of a new small program from the attachment.
Thanks.
Yes I would like to test the library under macOS but I dont know how much time I can invest, because I will start a new job in a few weeks. Besides, as I said before, I'm not really experienced, but I'll do my best!
As for the small programm the building is without errors and the output says:
"
TMPDIR: '/var/folders/tz/1psd8w0n20b6xwkyl5rm1_1m0000gn/T/'
TMP: '-'
TEMP: '-'
TEMPDIR: '-'
Test for random name: -1_12454
Result TmpFolder: /var/folders/tz/1psd8w0n20b6xwkyl5rm1_1m0000gn/T/
Test Tmp File: /var/folders/tz/1psd8w0n20b6xwkyl5rm1_1m0000gn/T//xlsx_1234/Test.xml
mkdir: "/": unknown. Res: -1 errno21
MakeDirectory: 0
"
Thanks for the help!
Many thanks for the help, you have already helped a lot! And let me congratulate you with a new job.
I also ask you not to worry about your experience, all my tests are simple, only the result of their execution is needed.
Also I apologize for the very long response. I'm still on a business trip and have almost no free time.
If you are still ready to continue testing, then I improved a small program. You can also check the modified version of the library from the attachment. I think a modified version of the library can already earn.
Thanks again for your help!
Last edit: Alexandr Belyak 2019-03-08
macOS support was added in version 0.33. Thank you for your help.