Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

How to Read in xls file that requires permission to open in R

$
0
0

I have several xls files I need to read in and combine into one dataframe. I try

df <- readxl::read_excel("file.xls")

or

df <- readxl::read_xls("file.xls")

but neither works. I get the following error

Error: 
  filepath: /Users/.../.../file.xls
  libxls error: Unable to open file

I believe the issue is that every time I open the file in Excel, I am asked if I trust this file before I can open it. Is there anyway around it?

I also am operating on a mac, and I want to avoid library(xlsx) or another packages that have Java dependencies

UPDATE: I had the idea of just going into each file to click "Save As ..." and change the format to xlsx instead of xls, but the default file format that showed was Excel 2004 XML Spreadsheet (.xml). Does that suggest that my file is actually an xml file even though the extension in the name is .xls?


Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>