1. How to read xlsx files in Euphoria

What are my options for reading data from an excel file into a Euphoria program?

regards, Spock

new topic     » topic index » view message » categorize

2. Re: How to read xlsx files in Euphoria

Spock said...

What are my options for reading data from an excel file into a Euphoria program?

regards, Spock

There's no native library in Euphoria to do this afaik. (You could start with one of the XML libraries and add stuff from there, but it'd be a lot of work.)

I'd recommend either http://poi.apache.org/ with JNI (see http://www.rapideuphoria.com/e-examples.zip or http://www.rapideuphoria.com/japi.tar.gz for examples on how to do this) or (for a C/C++ library that's easier to wrap directly in Eu) libopc: http://wp.libpf.com/?p=670 and http://libopc.codeplex.com/

new topic     » goto parent     » topic index » view message » categorize

3. Re: How to read xlsx files in Euphoria

Spock said...

What are my options for reading data from an excel file into a Euphoria program?

You can do this with EuCOM. There are some Excel wrappers and demo included. I think there were some updates to the last release to get some things working with euphoria 4.0, so you might be better off downloading a snapshot from the mercurial repository.

I haven't used this stuff in a long time, but if you have issues, please ask.

Matt

new topic     » goto parent     » topic index » view message » categorize

4. Re: How to read xlsx files in Euphoria

Spock said...

What are my options for reading data from an excel file into a Euphoria program?

regards, Spock

What about Matt's com library

http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=eucom

new topic     » goto parent     » topic index » view message » categorize

5. Re: How to read xlsx files in Euphoria

BRyan said...
Spock said...

What are my options for reading data from an excel file into a Euphoria program?

regards, Spock

What about Matt's com library

http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=eucom

That's fine if you have both a certain proprietary OS and a certain proprietary suite.

Since the OP didn't specify whether or not this was the case, I went with options that should still work without either. All involve trade-offs in one way or another...

new topic     » goto parent     » topic index » view message » categorize

6. Re: How to read xlsx files in Euphoria

Spock said...

What are my options for reading data from an excel file into a Euphoria program?

regards, Spock

I use OpenOffice 4.0 (a free software) to open the XLS or XLSX file and save it as CSV.
I can then use the CSV file easily in many development level languages.
Euphoria has csv.zip and I am sure other development tools to read write CSV files, and extract/manipulate data.
There are also many other tools (some free) available to convert Excel files to different text formats.

I have used the "save as DBF" facility of OpenOffice and Excel to save files as DBF and then use DBF software to modify or extract useful data.
Euphoria's DBF system does exist but it is at a very simple level and there are not many functions.
You can use Harbour (a free software) to maniputlate the DBF file and sore it as DBF, CSV, XLS, etc.
Alternatively you can use Euphoria's facilities to convert to EDS database.

There is also EDS tool box "edstb13.zip", a year 2000 effort in Euphoria, which may need some modification to read write XLS files now under Euphoria 4, and certainly will not handle XLSX files.
Again you can use OpenOffice 4.0 to read XLSX file, save it as XLS and hopefully use this tool box with minor modifications.

In conclusion, although Euphoria may not have a directly usable software to manipulate XLSX files, there are easy ways to enable you to use Excel file with Euphoria.

new topic     » goto parent     » topic index » view message » categorize

7. Re: How to read xlsx files in Euphoria

mattlewis said...
Spock said...

What are my options for reading data from an excel file into a Euphoria program?

You can do this with EuCOM. There are some Excel wrappers and demo included. I think there were some updates to the last release to get some things working with euphoria 4.0, so you might be better off downloading a snapshot from the mercurial repository.

I haven't used this stuff in a long time, but if you have issues, please ask.

Matt

Matt,

I couldn't get Eucom (from the archive) to work under 4.0 and the link gives me a "Error 404" msg. What to do?

Spock

new topic     » goto parent     » topic index » view message » categorize

8. Re: How to read xlsx files in Euphoria

Spock said...
mattlewis said...
Spock said...

What are my options for reading data from an excel file into a Euphoria program?

You can do this with EuCOM. There are some Excel wrappers and demo included. I think there were some updates to the last release to get some things working with euphoria 4.0, so you might be better off downloading a snapshot from the mercurial repository.

I haven't used this stuff in a long time, but if you have issues, please ask.

Matt

Matt,

I couldn't get Eucom (from the archive) to work under 4.0 and the link gives me a "Error 404" msg. What to do?

Spock

Does using http://sourceforge.net/projects/eucom/files/eucom/v2.08/eucom-2-08.zip/download help ?

Or, try going to http://sourceforge.net/p/eucom/svn/7/tree/trunk/ and clicking on "Download Snapshot" ...

new topic     » goto parent     » topic index » view message » categorize

9. Re: How to read xlsx files in Euphoria

jimcbrown said...
Spock said...
mattlewis said...
Spock said...

What are my options for reading data from an excel file into a Euphoria program?

You can do this with EuCOM. There are some Excel wrappers and demo included. I think there were some updates to the last release to get some things working with euphoria 4.0, so you might be better off downloading a snapshot from the mercurial repository.

I haven't used this stuff in a long time, but if you have issues, please ask.

Matt

Matt,

I couldn't get Eucom (from the archive) to work under 4.0 and the link gives me a "Error 404" msg. What to do?

Spock

Does using http://sourceforge.net/projects/eucom/files/eucom/v2.08/eucom-2-08.zip/download help ?

Or, try going to http://sourceforge.net/p/eucom/svn/7/tree/trunk/ and clicking on "Download Snapshot" ...

Thanks for the links, Jim. I downloaded the eucom bundle from the first link. I had to also d/l win32lib to try the sheet demo. It wouldn't work due to some unresolved references:

c:\euphoria\win32lib\include\win32lib.ew:10090 
<0074>:: Errors resolving the following references: 
	..\..\win32lib\include\win32lib.ew (10066): OleInitialize 
	..\..\win32lib\include\win32lib.ew (10070): OleUninitialize 
	..\..\win32lib\include\win32lib.ew (10090): OleUninitialize 
 
    OleUninitialize() 
 

So I d/l the snapshot and try the demos again. This time the interpreter can't find sequence.e (because I never use include\std). Adding it to the EUINC var only gets me:

c:\euphoria\win32lib\include\win32lib.ew:10090 
<0074>:: Errors resolving the following references: 
    ..\eucom.ew (979): reverse 
    ..\eucom.ew (980): reverse 
    ..\eucom.ew (981): reverse 
    ..\..\win32lib\include\win32lib.ew (10066): OleInitialize 
    ..\..\win32lib\include\win32lib.ew (10070): OleUninitialize 
    ..\..\win32lib\include\win32lib.ew (10090): OleUninitialize 
 
    OleUninitialize() 
  
                  ^ 

I give up. I'm going to watch TV..

Spock

new topic     » goto parent     » topic index » view message » categorize

10. Re: How to read xlsx files in Euphoria

Spock said...

I couldn't get Eucom (from the archive) to work under 4.0 and the link gives me a "Error 404" msg. What to do?

Yikes...that was in bad shape. I've brought it up to 4.0 speed and written a new excel demo (excel.exw) that will read and print out an excel sheet. It's pretty rough, but shows some of the basics. You can download a shapshot or check out the repo from here:

https://sourceforge.net/p/eucom/code/ci/default/tree/

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu