0

I'm using a microsoft app (from http://portal.office.com) to translate and stock tweet on an online excel sheet, now I want to read it with R.

The data in excel sheet url https://myagency-my.sharepoint.com/.../tweet.xlsx

I tried:

library(readxl)
read_excel('//companySharepointSite/project/.../ExcelFilename.xlsx', Sheet1', skip=1)`

from this post. It gives:

Error in sheets_fun(path) :    Evaluation error: zip file
Axeman
  • 32,068
  • 8
  • 81
  • 94
s.brunel
  • 1,003
  • 10
  • 24
  • [This](https://stackoverflow.com/questions/24165623/read-excel-file-into-r-with-xlconnect-package-from-url) may be helpful – Aramis7d Jul 27 '17 at 09:42

1 Answers1

0

I believe read_excel works only with local files. This might do the trick:

library(xlsx)  
library(httr)
url <- 'https://myagency-my.sharepoint.com/.../tweet.xlsx'  
GET(url, write_disk("excel.xlsx", overwrite=TRUE))  
frmData <- read.xlsx("excel.xlsx", sheetIndex=1, header=TRUE) 
Jindra Lacko
  • 7,814
  • 3
  • 22
  • 44
  • hello i get `Error in curl::curl_fetch_disk(url, x$path, handle = handle) : error setting certificate verify locations: CAfile: /mingw32/ssl/certs/ca-bundle.crt CApath: none` when i'm doing this – s.brunel Jul 27 '17 at 13:51
  • This looks more like *https connect* issue than *excel file reading* issue; I am afraid I can not help with that :( – Jindra Lacko Jul 27 '17 at 14:02