Numbers and HTML tables

First off, let me say Hey, I'm new, I'm Jared... thanks to everyone who puts in effort to help people on these forums and I'll be publicly grateful for any assistance. As one who is involved in a great deal of community support I know the effort it takes and y'all rock.

Now my issue 😉 : Has anyone figured out a way to get Numbers to turn an HTML table into a spreadsheet without some sort of external script? Does anyone have such an external script?

I'm so bummed I could cry... I've been going thru a great deal of culture shock having been an Excel user for many years and switching to Numbers a while back. Having been in IT and software development for the last 16 years, I came to rely on Excel to be able to split any delimited data into columns on the fly based on my own random delimiter. I also came to rely on Excel to be able to convert any table-style input to a spreadsheet format. Because of these two factors, Excel has been one of my go-to tools over the years for all sorts of analysis.

Enter Numbers... finally, Apple's putting out a spreadsheet! YAY! Oh, ****, wait... hrm. The two main features that make Excel useful to me aren't there.

I have lots of friends that have switch to OS X in the last year, and I've chewed them all out for saying "But in Windows I could..." as they were transitioning. "You're not ON Windows, this is different, get used to it and do what THIS does. Forget Windows... other than knowing how to use a mouse and a keyboard, very little will transfer from one to the other." The problem is that now I'm finding myself sorely tempted to do something similar. "But with Excel I could..!" Ugh!

PS - I exaggerated about crying, but not by much. 😉

Mac OS X (10.4.11), Numbers 1.0.2 HTML table import

Posted on Oct 13, 2008 8:56 AM

Reply
5 replies

Oct 13, 2008 9:20 AM in response to jrypkahauer

jrypkahauer wrote:
First off, let me say Hey, I'm new, I'm Jared... thanks to everyone who puts in effort to help people on these forums and I'll be publicly grateful for any assistance. As one who is involved in a great deal of community support I know the effort it takes and y'all rock.

Now my issue 😉 : Has anyone figured out a way to get Numbers to turn an HTML table into a spreadsheet without some sort of external script? Does anyone have such an external script?


What are you calling an HTML table ?

I assumes that in fact, you are copying a table from a Web page and try to paste it in Numbers.

If I am right, it's a problem which was heavily discussed here.

From my point of view the problem is not in Numbers but in Safari which fails to build the clipboard correctly when it is asked to fill the clipboard with what is displayed as a table.
The result is not a TSV set of values but a return separated set of values.

The workaround was described many times: don't grab the tables from Safari but from Firefox.

Of course, maybe I don't understand correctly the problem.

Yvan KOENIG (from FRANCE lundi 13 octobre 2008 18:20:38)

Oct 13, 2008 9:45 AM in response to KOENIG Yvan

Thanks, Koenig...

You're mostly right. I was copying the raw source from the View Source screen, which works in Excel because it converts a set of <table>...</table> tags to the correct values before pasting into the spreadsheet. You can also open a .html file containing a <table /> tag set with Excel and it will open as a spreadsheet... so while I can do what you're suggesting with Firefox and it will work, that's only part of the issue.

I really did mean that I think Numbers should support tabular data. Really, HTML tables are just tabular XML representations, so it makes sense to me that Numbers should support not just HTML <table /> tag sets but any XML-based tabular data.

Oct 13, 2008 10:32 AM in response to jrypkahauer

jrypkahauer wrote:
Thanks, Koenig...

You're mostly right. I was copying the raw source from the View Source screen, which works in Excel because it converts a set of <table>...</table> tags to the correct values before pasting into the spreadsheet. You can also open a .html file containing a <table /> tag set with Excel and it will open as a spreadsheet... so while I can do what you're suggesting with Firefox and it will work, that's only part of the issue.

I really did mean that I think Numbers should support tabular data.


It does. I import daily TSV files (.txt extension required)

Really, HTML tables are just tabular XML representations, so it makes sense to me that Numbers should support not just HTML <table /> tag sets but any XML-based tabular data.

In the one which I saw, the tags where extremely variable ones.
All of us may import them using a simple protocol:
open the file in Firefox
Copy paste the table from Firefox, paste in Numbers.

No need to add complementary code in Numbers. Remember, MacOS X is multitask aware.

At this time the only case where I was annoyed is files in which values where separated by variable chunks of spaces. I already wrote that I feel that this kind of file which is a remainder of the typewriter era is perfectly foolish.

Yvan KOENIG (from FRANCE lundi 13 octobre 2008 19:32:30)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Numbers and HTML tables

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.