Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown format error when reading xlsx format file without an extension #130

Closed
Eugllena opened this issue Oct 12, 2016 · 5 comments
Closed
Labels

Comments

@Eugllena
Copy link

When I used "import" to read an xlsx format file which have no extension, it gave an error message: "Unknown format". I have set format = "xlsx", but the function still couldn't recognize.

The problem is because the function readxl can't recognize a file without an extension, it has been pointed out here.

Can you modify the function so that it works even with a file which has no extension but provide the code of file format.

@leeper
Copy link
Contributor

leeper commented Oct 12, 2016

Hmm...we could set this up to copy the file to a temporary directory and add an extension so it can be imported. Would that work for you?

@Eugllena
Copy link
Author

Yes, it works. But will it be slow when the data set is big?

@leeper
Copy link
Contributor

leeper commented Oct 14, 2016

Yes, it could be.

@leeper leeper closed this as completed in 8c001b1 Feb 14, 2017
@jennybc
Copy link

jennybc commented Feb 14, 2017

readxl now exposes read_xlsx and read_xls for reading extensionkess files. But someone still has to determine which it is, somehow.

leeper added a commit that referenced this issue Feb 14, 2017
@leeper
Copy link
Contributor

leeper commented Feb 14, 2017

@jennybc Oh, cool. I'm pushing an update to reflect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants