libxlsxwriter

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

libxlsxwriter

Post by the.weavster »

I understand PB 6.10 is going to be a feature release and so I'd like to propose the addition of libxlsxwriter.

Databases need reports and I think this would be a good step in that direction.
Little John
Addict
Addict
Posts: 4789
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: libxlsxwriter

Post by Little John »

We know that XLS and XLSX are proprietary file formats by Microsoft.
Wouldn't it be better for PureBasic to support spreadsheets according to the Open Document standard? Just an idea.
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: libxlsxwriter

Post by the.weavster »

Little John wrote: Sun Dec 03, 2023 12:29 pm We know that XLS and XLSX are proprietary file formats by Microsoft.
The XLSX format was developed by Microsoft but I believe it's now an open standard ( ECMA-376, ISO/IEC 29500 ) and covered by Microsoft's Open Specification Promise.

Trying to come up with something as functional as XLSXWriter for the ODF format would be a lot more work than incorporating an existing, well tested library.
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: libxlsxwriter

Post by the.weavster »

Bump
I still think this would be a cool feature for those of us that do business applications 8)

The library is written in ANSI C, the license is FreeBSD and the only dependency is zlib.
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: libxlsxwriter

Post by Caronte3D »

+1
Fred
Administrator
Administrator
Posts: 18220
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: libxlsxwriter

Post by Fred »

This one is too specific for PB IMHO, but it seems very easy to wrap. You just need to build the lib with cmake and do the import files.
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: libxlsxwriter

Post by Justin »

This can be useful, so i compiled the static libs for mac, win and linux.

I imported a few functions to test, it works on the 3 platfroms creating an standalone executable. I don't have the time now to translate all the headers but it should be simple.

To install it simply copy the corresponding static libs for the OS to the PureLibraries\UserLibraries folder in every purebasic installation.
Or compile them by yourself, the libs to copy are: libxlsxwriter, libminzip and libz

Run the example xlsxwriter_test.pb, this will create a basic xlsx file.
Only for 64 bit for now.

Project at github:
https://github.com/omegakode/PBXlsxWriter
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Re: libxlsxwriter

Post by jack »

I had a look at the libxlsxwriter project, the project builds quickly and without any warnings or errors using msys2
but some of the headers are a bit complex
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: libxlsxwriter

Post by Justin »

After looking at it the most complex part will be the macros from sys/queue.h and sys/tree.h, but definitely doable. The rest are normal structs and enums.
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: libxlsxwriter

Post by the.weavster »

Justin wrote: Wed Jan 29, 2025 1:16 am To install it simply copy the corresponding static libs for the OS to the PureLibraries\UserLibraries folder in every purebasic installation.
Or compile them by yourself, the libs to copy are: libxlsxwriter, libminzip and libz

Run the example xlsxwriter_test.pb, this will create a basic xlsx file.
Only for 64 bit for now.

Project at github:
https://github.com/omegakode/PBXlsxWriter
Thanks, Justin :D
This is really helpful.
Quin
Addict
Addict
Posts: 1133
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: libxlsxwriter

Post by Quin »

Justin wrote: Wed Jan 29, 2025 1:16 am This can be useful, so i compiled the static libs for mac, win and linux.

I imported a few functions to test, it works on the 3 platfroms creating an standalone executable. I don't have the time now to translate all the headers but it should be simple.

To install it simply copy the corresponding static libs for the OS to the PureLibraries\UserLibraries folder in every purebasic installation.
Or compile them by yourself, the libs to copy are: libxlsxwriter, libminzip and libz

Run the example xlsxwriter_test.pb, this will create a basic xlsx file.
Only for 64 bit for now.

Project at github:
https://github.com/omegakode/PBXlsxWriter
Managed to get it to work on Windows 10 21H2 IoT. Well done!
Post Reply