BasicExcel class, geting row height and borders

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
User avatar
cutecode
I live to help wx-kind
I live to help wx-kind
Posts: 181
Joined: Fri Dec 09, 2016 7:28 am
Contact:

BasicExcel class, geting row height and borders

Postby cutecode » Mon Mar 12, 2018 3:27 pm

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?
regards,
Alexander Saprykin
www.wxwidgets.ru

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1707
Joined: Sun Jan 03, 2010 5:45 pm

Re: BasicExcel class, geting row height and borders

Postby PB » Mon Mar 12, 2018 8:49 pm

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

User avatar
eranon
Can't get richer than this
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

Postby eranon » Tue Mar 13, 2018 1:07 pm

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

User avatar
cutecode
I live to help wx-kind
I live to help wx-kind
Posts: 181
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: BasicExcel class, geting row height and borders

Postby cutecode » Tue Mar 13, 2018 4:03 pm

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
regards,
Alexander Saprykin
www.wxwidgets.ru

User avatar
cutecode
I live to help wx-kind
I live to help wx-kind
Posts: 181
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: BasicExcel class, geting row height and borders

Postby cutecode » Tue Mar 13, 2018 4:08 pm

Oh, libXL is not free
You should by a lisense, and it is expensive for me
regards,
Alexander Saprykin
www.wxwidgets.ru

User avatar
eranon
Can't get richer than this
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

Postby eranon » Tue Mar 13, 2018 7:54 pm

cutecode 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

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 price ;)
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"]

User avatar
cutecode
I live to help wx-kind
I live to help wx-kind
Posts: 181
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: BasicExcel class, geting row height and borders

Postby cutecode » Tue Mar 13, 2018 8:27 pm

at first look - nice lib for xlsx files, and has full documentation
thank you
regards,
Alexander Saprykin
www.wxwidgets.ru

tomicolon
In need of some credit
In need of some credit
Posts: 8
Joined: Thu Feb 22, 2018 7:40 pm

Re: BasicExcel class, geting row height and borders

Postby tomicolon » Fri May 11, 2018 6:30 pm

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

ExcelManipulator.h
(8.63 KiB) Downloaded 25 times

ExcelManipulator.cpp
(5.71 KiB) Downloaded 21 times



Regards from Argentina

User avatar
cutecode
I live to help wx-kind
I live to help wx-kind
Posts: 181
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: BasicExcel class, geting row height and borders

Postby cutecode » Fri May 11, 2018 6:52 pm

thank you, but I cant use OLE.
I need library which runs on WINDOWS/LINUX/MAC
regards,
Alexander Saprykin
www.wxwidgets.ru


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 2 guests