Exporting data from HTML tables

Exporting data from HTML tables

by Josep M. Fontana -
Number of replies: 5
I've posted a similar message to the Wiki forum but I haven't gotten any solution for my problem. Since I know many HTML gurus (Janne Mikkonen for one who's always been so helpful) hang out in this forum, perhaps I'll be luckier here (even though I admit this question is not directly related to the HTML editor).

Here's the question: it's very easy to export Excel files into HTML tables, but does anybody know whether and how it is possible to export data from HTML tables back to Excel?

I was planning to build a Wiki where people could add data to a table and I would like to be able to export this data to excel to be able to analyze them. I'm trying to figure out what the best way to do this would be.

Any help with this (or suggestions to do it differently) would be really welcome.

Josep M.
Average of ratings: -
In reply to Josep M. Fontana

Re: Exporting data from HTML tables

by Andrea Bicciolo -

Joseph, I made a quick test using OpenOffice.org 1.1.0: created a HTML page with a table, then from Openoffice.org Calc (the OO Excel equivalent) selcted Insert ->Table->From file. Selected the .html file and then clicked on Ok.

If you need a Excel format, just svae the OO Calc file in .xls. That's it. Probably also Excel has it's own insert functionality. Anyone?

In reply to Josep M. Fontana

Re: Exporting data from HTML tables

by Janne Mikkonen -
Exporting from excel I'd imagine just save as HTML page???

To import data to excel, have you tried "web query"? (I don't know what the real english version is called, since I've used finnish versions of Excel).

- Janne -

ps. Attacment has been made this way.
In reply to Janne Mikkonen

Re: Exporting data from HTML tables

by Josep M. Fontana -
Thanks a lot Janne and Andrea,

I'll definitely try the Open Office option. There is no reason why what I want to do has to be in Excel. Actually, this is a good excuse to start doing a transition to Calc from Excel. Excel in fact does not have (at least I haven't been able to find it) this functionality of importing data from an HTML table.

I've tried the option suggested by Janne and it hasn't worked for me. Well, I think it must be the same option. I have a Spanish version of Excel and the only functionality that sounds like "Web query" is something found in the menu (translated from Spanish): data > obtain external data > web query. When
I did that, it asked me for the URL and I gave it the URL where I have the Wiki (within my Moodle). It couldn't download any data and I got a message saying "this query did not return any data" . I think it must have to do with the Wiki being within Moodle. Since Moodle requires a password, maybe Excel cannot access the page with the web query. How did you do it, Janne? Was the table that you managed to import within Moodle? Or was it a regular web page which did not require a password to access it?

 I circumvented the problem by saving the web page and then, still using the 'Web query' option, introducing the path to the saved file. The only problem is that then Excel imports the whole web page, not just the table. But that can be fixed rather easily.

Again, thanks very much for your help.

Josep M.
In reply to Josep M. Fontana

Re: Exporting data from HTML tables

by Janne Mikkonen -
Yes the table was within Moodle (the forum list of this course).
I just typed the url (and logged in in the web query window) chose the tables which I wanted to import (yellow boxes with black arrows pointing right) and voilá...

- Janne -


In reply to Janne Mikkonen

Re: Exporting data from HTML tables

by Josep M. Fontana -
Mmmh, it doesn't seem to work for me. I keep on getting this message saying that this web query didn't return any data. Oh well, I'll just do it differently. Thanks anyway.

Josep M.