Excel API for C/C++
-
wrote on 5 Dec 2010, 04:03 last edited by
[quote author="Volker" date="1291507360"]Unfortunately we also must support opening Excel files in the native (i.e. non-XML) format, otherwise we would had to convert them by hand. Giving xlsx to our users would be ok.[/quote]
I believe Microsoft has a tool for converting non-XML to XML. You may be able to use it in a batch process.
So you only need to get info out? You don't need to be able to edit it and save it? There are quite a number of tools to convert XML files in to other formats, I believe.
-
wrote on 5 Dec 2010, 21:31 last edited by
You did read of that "platform independent" thingy, didn't you? :) To be able to work on a Mac I cannot use the Microsoft tools. And of course that tool exists, it's called Excel :)
-
wrote on 5 Dec 2010, 21:46 last edited by
I think it's a downloadable tool for people with old versions of Excel actually. Standalone. But yes, it was a Windows app.
You have Excel on "Mac":http://www.ehow.co.uk/how_6316841_convert-xls-xlsx-mac.html too :P
There may be a Mac app for this. Or you could try wine (or similar).
Probably make life much easier.
-
wrote on 5 Dec 2010, 21:49 last edited by
Come on... you cannot force your commercial customers to install wine just to convert some crappy xls files :-)
Everthing other than a lib I can incorporate to my app is not acceptable; it's more pleasent for the user if we upload the files to the business logic server then.
-
wrote on 5 Dec 2010, 21:55 last edited by
Alright, I guess since it is for paying customers it is best to treat them nice.
Good luck with your Excel API. I'm sure someone has written something like it for Qt somewhere. You checked Qt-Apps already and similar sites?
This can search Excel files: http://qt-apps.org/content/show.php/recoll?content=66138
But might not have the full API. -
wrote on 5 Dec 2010, 22:00 last edited by
I've searched around with google, got some things that might be interesting, but nothing with using Qt in the first search results. It's not on a very high priority at the moment, so no need to worry. I thought it's worth a try in this forum - if you don't ask, you won't get an answer...
-
wrote on 28 Dec 2010, 12:33 last edited by
There are 2 C++ libaries to create excel.
One is free xlslib : http://xlslib.sourceforge.net/
Other is commercial libXL : http://www.libxl.com/Sorry for late response and I don't know whether you need this or not. But for others I share...
-
wrote on 28 Dec 2010, 13:02 last edited by
Thanks for the links. libxl I will have a look into. xlslib unfortunately cannot read XLS files. This is the crucial part. Writing the files could be quite easily approached with the new XML based format (thats seems not too complicated as long as there are no formulas or cross references, which we do not need).
-
wrote on 28 Dec 2010, 14:10 last edited by
Another available option is to attempt to extract the code from an open source excel reading competitor.
Open Office - http://www.openoffice.org/ - is likely to be used,
Gnumeric is probably a better option.
Excel code is here - http://git.gnome.org/browse/gnumeric/tree/plugins/excel -
wrote on 29 Dec 2010, 04:42 last edited by
Libxls
libxls is a C library which can read Excel (xls) files. It has been tested on Linux x86 and Cygwin but may work on any little-endian system. ...
"libxls.sourceforge.net":http://libxls.sourceforge.net[EDIT: clickable link, Volker]
-
wrote on 29 Dec 2010, 13:31 last edited by
Thanks for the link Yash, it looks promising. It could be a good start and maybe I find some time to make a Qt version.
-
wrote on 5 Jan 2011, 22:45 last edited by
What's about KOffice? As far as I know they use MS -> OOo -> KOffice, but they might have a cuter API to the OOo routines since they are Qt-based.
-
wrote on 5 Jan 2011, 23:16 last edited by
KOffice falls out due to license issues - unfortunately.
-
wrote on 5 Jan 2011, 23:53 last edited by
[quote author="Yash" date="1293597766"]Libxls
[EDIT: clickable link, Volker][/quote]
Not yet.... -
wrote on 5 Jan 2011, 23:55 last edited by
Thanks - corrected * 2 :-)
-
wrote on 6 Jan 2011, 00:00 last edited by
Has anybody figured out what kind of license is? GPL, LGPL, ... ?
I would like to include all the "open source" tools/libraries we talk about into wikis so when needed one can find them in one place.
EDIT: What are the KOffice license issues?
-
wrote on 6 Jan 2011, 00:24 last edited by
From http://www.koffice.org/contribute/:
bq. KOffice is released under the LGPL v2+ (and GPL v2+ for some parts).
-
wrote on 6 Jan 2011, 00:28 last edited by
[quote author="Volker" date="1294273445"]From http://www.koffice.org/contribute/:
bq. KOffice is released under the LGPL v2+ (and GPL v2+ for some parts).[/quote]
Why was that a problem then? Can't get much more flexible than that (unles you are looking for the one part that is only GPL and you want to release a closed source app).
EDIT: before I get screamed at: warning: I don't have any idea of the details about "v2+"
-
wrote on 6 Jan 2011, 00:30 last edited by
I'd have to extract the parts I need, remove the KDE stuff (not available on Windows and Mac) and publish it as a new LGPL project. We do not have the time for that at the moment and it's not on top of the want-have list of the customer.
-
wrote on 6 Jan 2011, 00:31 last edited by
I see.... so the issue is not exactly with the license...