I failed import an xls file from website in Mathematica but got no problem to download it directly using chrome. Can anyone help me solve the problem? Thanks. The detailed situation is listed as the following:

In[12]:= Import["https://files.datapress.com/london/dataset/cis-commissioned-2011-census-tables/2015-11-16T13:32:06/CT0060 - Passports held (detailed).xls"]

During evaluation of In[12]:= FetchURL::httperr: The request to URL https://files.datapress.com/london/dataset/cis-commissioned-2011-census-tables/2015-11-16T13:32:06/CT0060 - Passports held (detailed).xls was not successful. The server returned the HTTP status code 403 ("Forbidden").

Out[12]= $Failed


The blanks need to be %20 in a url:


"{ {"Office for National Statistics"}, {""}, {"CT0060 - Passports held (detailed)"} } ..

  • $\begingroup$ Thank you, it indeed works! Would it be possible for you to explain it a bit more to me, why changing space to %20 works? $\endgroup$ – llybt008 Nov 16 '15 at 21:08
  • 1
    $\begingroup$ spaces are not permitted in URL's. Your browser is kind enough to fix the error, while mathematica sends out exactly what you keyed in. $\endgroup$ – george2079 Nov 16 '15 at 21:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.