我想使用 Excel 文件的 url从网站链接中读取 Excel 文件的工作表 1 。我在 Windows 10,R 3.6.1 上。
我正在尝试使用readxl 包中的 Read Excel file from a URL 中的代码,并且还检查了使用 readxl R 将 excel 文件读取到单个数据帧中。
url = 'https://dataverse.harvard.edu/file.xhtml? persistentId=doi:10.7910/DVN/WEGWGS/I11K9Y&version=1.0'
GET(url, write_disk(tf <- tempfile(fileext = ".xls")))
df <- read_excel(tf, 1L)
# Error message
libxls error: Unable to open file
Run Code Online (Sandbox Code Playgroud)
我收到以下错误消息:
libxls 错误:无法打开文件
谢谢你的帮助!