Excel 2007/2010/2016 - Get External Data From Web - "An error has occurred in the script" and generally crashes

3.6k Views Asked by At

For years I have been downloading data from certain web sites via Excel's Get External Data->From Web function. In Excel 2007,2010,2016 on various PCs and laptops running various Windows operating systems, the one thing that is consistent is the incredible unreliability. I have always got multiple "An error has occurred in the script on this page" errors (to which I click Yes), and as often as not it just hangs and I have to terminate Excel in Task Manager.

E.g. if I go to www.ft.com, I get 3 "An error has occurred in the script" messages at line 1. I then click on login, I get two more error messages. I am then completely unable to type in the email address field to login. I have to terminate Excel to exit. Over the years I have managed to get through this incredible unreliability one way or another, but now I have hit a dead end.

I get similar behaviour on most websites. E.g. www.morningstar.co.uk.

It appears that Excel uses a different version of IE for its queries. So I cannot login using IE11 or Edge and then use that login to go straight to the relevant data page on ft.com that I want to access. I have to login to FT.com via Excel

Very frustrating. Any ideas?

1

There are 1 best solutions below

0
drb01 On

Well this isn't so much an answer as a workaround. It is easy to write some VBA to load the data using Internet Explorer (i.e IE11 as installed separately on your PC) rather than going via the Excel-Get Data from Web function. E.g. see this link

Transferring webpage data to an Excel Worksheet using VBA

It copies the entire web page without formatting, but this was good enough for my purposes.

I am still puzzled why the Excel-Get Data from Web function continues to be so extremely unreliable after so many years