Could anyone help me with BasicExcel class
https://www.codeproject.com/search.aspx ... y=0&sbo=kw
1. how to get height of a row?
2. how to set borders top/down/left/right?
BasicExcel class, geting row height and borders
Re: BasicExcel class, geting row height and borders
After looking at the API (i.e., function declarations in the header files) I came to conclusion that this is not supported neither in BasicExcel nor ExcelFormat (which superseded BasicExcel).
What makes you think otherwise? You may need to look for another library. A couple of years back,I looked for a free C++ library allowing reading AND writing MS Excel files, I did not find any that would satisfy my criteria. I ended up automating Excel to make it do what I wanted, but obviously that is not a viable solution if your application has to run on computers without Excel installed. But perhaps situation improved since then...
What makes you think otherwise? You may need to look for another library. A couple of years back,I looked for a free C++ library allowing reading AND writing MS Excel files, I did not find any that would satisfy my criteria. I ended up automating Excel to make it do what I wanted, but obviously that is not a viable solution if your application has to run on computers without Excel installed. But perhaps situation improved since then...
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: BasicExcel class, geting row height and borders
Hello, Unless you just need a simple table (in this case, you can simply manage files in CSV format -- nothing mysterious), here are two dedicated libs to read and write Excel format : https://sourceforge.net/projects/xlslib/ and http://www.libxl.com (notice I've no experience with them, just found them through search engine with these keywords: c++ lib excel).
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: BasicExcel class, geting row height and borders
I'm already using OLE for XLS files for 10 years, but this aprouch is too slow and it needs Excel to be installed on client side
I'm already using xlslib for 2 years, but it has two lacks for my needs
1. it can only create and write to *.xls fils, but can not read from *.xls
2. I cannot insert pictures it XLS cells
That's why I wanted to try some other XLS library
Thank you, I'll try libXL library. At first look it sounds good
I'm already using xlslib for 2 years, but it has two lacks for my needs
1. it can only create and write to *.xls fils, but can not read from *.xls
2. I cannot insert pictures it XLS cells
That's why I wanted to try some other XLS library
Thank you, I'll try libXL library. At first look it sounds good
Re: BasicExcel class, geting row height and borders
Oh, libXL is not free
You should by a lisense, and it is expensive for me
You should by a lisense, and it is expensive for me
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: BasicExcel class, geting row height and borders
You do not have to use the same lib for reading and writing. This one seems (not digged) to allow image out of the box: https://libxlsxwriter.github.io. Or you can write your own wxWidget based lib and sell it at half of the libXL pricecutecode wrote: I'm already using xlslib for 2 years, but it has two lacks for my needs
1. it can only create and write to *.xls fils, but can not read from *.xls
2. I cannot insert pictures it XLS cells
Last edited by eranon on Tue Mar 13, 2018 9:37 pm, edited 1 time in total.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: BasicExcel class, geting row height and borders
at first look - nice lib for xlsx files, and has full documentation
thank you
thank you
Re: BasicExcel class, geting row height and borders
A professor from my university in Argentina called Pablo Novara, who is the creator of the projects IDE ZinjaI and PSeint (search them at sourceforget), wrote a class "ExcelManipulator" to work with excel templates, I do not know if it's useful for you, anyway I offer the information.
This class allows you to open an Excel spreadsheet, modify it, save it
* print it, etc. The idea is for the programmer to design the form you want
* print with Excel, and leave blank the fields to be completed. Then, from the
* application to be printed, this class is used to complete those fields.
*
* The class uses the Excel itself, loading it into memory (hidden if it is
* want, so that the user of the application does not notice it) and sends the commands
* to edit and print the spreadsheet. Everything is done through the OLE interface,
* which is accessed through the wxAutomationObject class of wxWidgets.
*
* The good thing about this library is that it makes the printing of forms very easy
* and spreadsheets, since they are designed with Excel directly. Also, if there is
* change the spreadsheet, just modify the xls, and it is not necessary to recompile.
* As a disadvantage, it is very expensive to build an Excel to print in memory
* Simple things, and also depends on that is installed. Consequently, neither
* works in GNU / Linux. However, the library compiles without errors in GNU / Linux
* But in that case, no method does anything.
*
* The procedure to use this library is then:
* - # Design the form with Excel and save it
* - # Create an instance of ExcelManipulator, passing it to the constructor the path
* to the xls file created in the previous point
* - # Use the SetValue methods to complete the blank cells
* - # Use the Print method to print the form
* - # Use the Close method to download the form from the memory
Regards from Argentina
This class allows you to open an Excel spreadsheet, modify it, save it
* print it, etc. The idea is for the programmer to design the form you want
* print with Excel, and leave blank the fields to be completed. Then, from the
* application to be printed, this class is used to complete those fields.
*
* The class uses the Excel itself, loading it into memory (hidden if it is
* want, so that the user of the application does not notice it) and sends the commands
* to edit and print the spreadsheet. Everything is done through the OLE interface,
* which is accessed through the wxAutomationObject class of wxWidgets.
*
* The good thing about this library is that it makes the printing of forms very easy
* and spreadsheets, since they are designed with Excel directly. Also, if there is
* change the spreadsheet, just modify the xls, and it is not necessary to recompile.
* As a disadvantage, it is very expensive to build an Excel to print in memory
* Simple things, and also depends on that is installed. Consequently, neither
* works in GNU / Linux. However, the library compiles without errors in GNU / Linux
* But in that case, no method does anything.
*
* The procedure to use this library is then:
* - # Design the form with Excel and save it
* - # Create an instance of ExcelManipulator, passing it to the constructor the path
* to the xls file created in the previous point
* - # Use the SetValue methods to complete the blank cells
* - # Use the Print method to print the form
* - # Use the Close method to download the form from the memory
Regards from Argentina
Re: BasicExcel class, geting row height and borders
thank you, but I cant use OLE.
I need library which runs on WINDOWS/LINUX/MAC
I need library which runs on WINDOWS/LINUX/MAC