Macro Request: Get table from web page and save as CSV file

Peter, exactly how did you do that?
I have tried this:

but I don't see any difference with the "applescript".

I read the Fenced code ref, but it didn't help. :frowning:

--this uses the "applescript" keyword
set strTest to the clipboard
--this does NOT use the "applescript" keyword
set strTest to the clipboard

Here are three examples, with info strings: xml, ruby, applescript. They are all rendered slightly differently.

set strTest to the clipboard
test( "hello" );
set strTest to the clipboard
test( "hello" );
set strTest to the clipboard
test( "hello" );

OK, so apparently applescript code highlighting was not turned on by default.

I’ve turned it on and restarted the server, and now it highlights @ccstone’s original comments (# line comments) correctly.

It does not fix the rendering bug though, that is a separate issue.

There are a bunch of languages turned on by default, but the only two I think we commonly use on here are applescript and javascript, both of which are now on (javascript was on originally).

1 Like

Thanks! It's nice to know that I was neither crazy nor blind! :sunglasses:
Well, at least not totally so. :wink:

Thanks for everyone’s help. And, now you have the hiccups sorted out I’m feeling less dumb.

I realize this is very old thread but If anyone is still interested and you happen to have an old PC laying around or can access one there is a very simple way to get tables from a web site with MS excel by using it's get external data/web query main menu option. I have an old pc running windows xp and excel 2002 that I use to create web query's and then I export the workbooks to my MacBook running excel for Mac 2011. The query's will run just fine on the Mac even though excel for Mac will not create or edit them. I use a VB macro to refresh all of the query's on a sheet at once. Now if I just need to figure out how to create a KM macro that would run the refresh macro at a certain time each day.

hey @edischy good idea!
I got Windows Excel 2007 running inside Crossover, but have yet to try the extra capabilities such as the web query.

For the refresh, there's the Time of Day trigger:

Another option is using Google Sheets, it has many options for grabbing content from web pages. It's what I've used from time to time.

Best of all: no need for extra software/hardware.

I have not tested this procedure, but it looks reasonable to me.
It's worth reviewing/testing.

Making and Using Excel web queries