Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
258 views
in Technique[技术] by (71.8m points)

excel - Error reading .xls file with format_from_signature NA in R

I have a .xls file which is sent to me daily and I'd like to automate the handling I do with it through R.

When I try to read the file using read_xls, it throws the following error libxls error: Unable to open file. For anyone with knowledge of Excel, this is one of those files that, when you try to open it there, Excel warns you about it not matching the file format and the extension. This, along with the fact that using format_from_signature on the file returns NA, tells me that the file isn't a real .xls file but rather a forced .xls document.

I can fix the issue for a single file by just opening it on Excel and saving it as a normal .xlsx, the problem is doing it frequently. I would like to replicate that process but all in R to automate it.

Edit: I've added an Excel file that meets the criteria I'm describing.

question from:https://stackoverflow.com/questions/65853165/error-reading-xls-file-with-format-from-signature-na-in-r

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...