Hello,
For my own needs I developped a plugin which is able to parse an .xls file and return the content of this file as a table (only cells texts are extracted, not format).
It is based on libxls C library available here : https://github.com/libxls/libxls
Do what you want with it.
Available here : https://github.com/BeChris/Hollywood-xlsreader
(in build directory there are xlsreader.hwp already compiled for linux64 and win32 platforms)
Short README:
/* Open an .xls file and:
** 1)If everything went well return its content as a table as described below:
** {
** ["first tab"] = {
** (note:first row) {"First column value", "Second column value", "Third column value", ...},
** (note:second row) {"First column value", "Second column value", "Third column value", ...},
** (note:third row) {"First column value", "Second column value", "Third column value", ...},
** ...
** },
** ["second tab"] = {
** (note:first row) {"First column value", "Second column value", "Third column value", ...},
** (note:second row) {"First column value", "Second column value", "Third column value", ...},
** (note:third row) {"First column value", "Second column value", "Third column value", ...},
** ...
** },
** ...
** }
**
** 2)If something went wrong raise an error containing message
*/
To use it:
@REQUIRE "xlsreader"
ExitOnError(False)
content = xlsreader.OpenXls(<path_to_an_xls_file>)
error = GetLastError()
ExitOnError(True)
; Now do what you want with content which is a table
New plugin: xlsreader
- airsoftsoftwair
- Posts: 5668
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: New plugin: xlsreader
Very nice! Can you do Amiga builds as well?
Re: New plugin: xlsreader
Hello, I only own a PC computer under Manajro Linux 64 bits.
Therefore I managed to compile a version for Linux64 and Windows32 (using msvc under Wine).
But unfortunately I don't own any Amiga for more than 20 years.
I someone give me pointers to URLs that explain how to put in place an Amiga dev environment under UAE I'll give it a try.
Therefore I managed to compile a version for Linux64 and Windows32 (using msvc under Wine).
But unfortunately I don't own any Amiga for more than 20 years.
I someone give me pointers to URLs that explain how to put in place an Amiga dev environment under UAE I'll give it a try.
- airsoftsoftwair
- Posts: 5668
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: New plugin: xlsreader
Hmm, without any experience for the past 20 years it might be a little tricky because on AmigaOS things are a bit more complicated than on the mainstream OSs. This is covered in the AmigaOS peculiarities section of the Hollywood SDK.
As a C compiler for Hollywood plugins I recommend vbcc because it's really lightweight and easy to set up.
As a C compiler for Hollywood plugins I recommend vbcc because it's really lightweight and easy to set up.
Re: New plugin: xlsreader
Just added macos and macos64 versions in the github repository.
Re: New plugin: xlsreader
I'm working on Amiga OS 3.x version using a cross toolchain installés on m'y Linux box.
Stat tunes for further news
.
Stat tunes for further news
Re: New plugin: xlsreader
I made an attemp in TEST_AMIGAOS3 branch but could not handle what I believe to be conversion from unicode to UTF-8.
On Linux it is done with libiconv but on Amiga ?
Someone interrested in helping on this plugin ?
On Linux it is done with libiconv but on Amiga ?
Someone interrested in helping on this plugin ?
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: New plugin: xlsreader
Would the ComposeChar command work from Unicode.library?
I'm on registered MorphOS using FlowStudio.
Re: New plugin: xlsreader
Thanks for the tip.
I will try that.
I will try that.
Re: New plugin: xlsreader
I just modified conversion from unicode to UTF-8 function so that it now uses Unicode functions from Hollywood >= 7
I also added xlsreader.hwp compiled for os3, os3fpu and mos (MorphOS).
Could someone take a look at what I did in TEST_AMIGAOS3 branch ?
It would be a pity if this plugin is available only for Windows, MacOS and Linux !
Many thanks in advance.
I also added xlsreader.hwp compiled for os3, os3fpu and mos (MorphOS).
Could someone take a look at what I did in TEST_AMIGAOS3 branch ?
It would be a pity if this plugin is available only for Windows, MacOS and Linux !
Many thanks in advance.