Skip to content
Back to formatted view

Raw Message

Message-ID: <507C2CC8.9060005@sapo.pt>
Date: 2012-10-15T15:33:28Z
From: Rui Barradas
Subject: Download a file from url
In-Reply-To: <1350291428483-4646215.post@n4.nabble.com>

Hello,

Your page returns "access denied":

library(RCurl)

url <- "http://www.nseindia.com/content/fo/fii_stats_12-Oct-2012.xls"
xls <- getURL(url)
cat(xls)
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>

You don't have permission to access 
"http&#58;&#47;&#47;www&#46;nseindia&#46;com&#47;content&#47;fo&#47;fii&#95;stats&#95;12&#45;Oct&#45;2012&#46;xls" 
on this server.<P>
Reference&#32;&#35;18&#46;f0241c2&#46;1350314817&#46;23d7e0e0
</BODY>
</HTML>

Also, start a new thread when you want to ask a new question.

Hope this helps,

Rui Barradas
Em 15-10-2012 09:57, veepsirtt escreveu:
> Hi
>
> Download the xls file from this link
> http://www.nseindia.com/content/fo/fii_stats_12-Oct-2012.xls
> <http://www.nseindia.com/content/fo/fii_stats_12-Oct-2012.xls>
>
> I tried this
> ---------------------------------------------------------------
>   library(XLConnect)
> url = "http://www.nseindia.com/content/fo/fii_stats_12-Oct-2012.xls"
> local.xls.file = tempfile()
> download.file(url, local.xls.file)
> wb = loadWorkbook(local.xls.file, create=F)
> data = readWorksheet(wb, sheet=1)
> View(data)
> ---------------------------------------------------------------
> no results ...
> kindly help me
> thanks
> veepsirtt
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Download-a-file-from-url-tp4642985p4646215.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.