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

read_excel() crashes R session #710

Open
ja-ortiz-uniandes opened this issue Sep 20, 2022 · 3 comments
Open

read_excel() crashes R session #710

ja-ortiz-uniandes opened this issue Sep 20, 2022 · 3 comments

Comments

@ja-ortiz-uniandes
Copy link

ja-ortiz-uniandes commented Sep 20, 2022

Before I start thanks to the readxl team, your product is awesome!

Problem:

I have a data set in Excel I'm try to import into R. The file opens without issue. The data starts on the 6th line and I only wanted to import a part of the file so I did:

library(readxl)
read_excel("myfile.xslx", range = "A7:P100")

I immediately get this screen:
R crash

Reprex

After downloading the file simply do:

readxl::read_excel(file, range = "A7:P100")

where file is the path.

Expected behavior

  1. No session crash
  2. Get the data in the A7:P100 range imported into R
@ja-ortiz-uniandes ja-ortiz-uniandes changed the title read_excel() craches R session read_excel() crashes R session Sep 20, 2022
@ja-ortiz-uniandes
Copy link
Author

I think someone should take a look at this as it could be a critical error.

@jennybc
Copy link
Member

jennybc commented Feb 9, 2023

Please provide the problematic file as described below.

How to provide a readxl reprex

We're in a much better position to address your issue if you can provide a reprex (reproducible example). Provide as much of this as you can:

  • An actual xls or xlsx file. Pick one:
    • Your personal xls or xlsx: try to strip it down to the minimal size and complexity to demonstrate your point. And, obviously, remove any sensitive data.
    • A publicly available xls or xlsx: provide URL and the code you used to download.
  • A small bit of R code that uses readxl on the provided xls or xlsx file and demonstrates your point.
    • Consider using the reprex package to prepare this. In addition to nice formatting, this ensures your reprex is self-contained.
  • Any details about your environment that seem clearly relevant, such as operating system.
    reprex(..., si = TRUE)
    will append a standard summary, folded neatly away, at the bottom of your reprex.

How to provide your own xls/xlsx file? In order of preference:

  1. Attach the file directly to your issue. Instructions are always at the bottom of the issue or comment box. .xlsx is a supported file type. You'll need to zip or gzip .xls so it appears as .zip or .gz.
  2. Share via DropBox or Google Drive and provide the link in your issue.
  3. Explain you absolutely cannot provide a relevant file via github.com and offer to provide privately.
  4. Don't share a file and realize you're hoping for, e.g., a bug fix with no concrete example to go on.

@DanChaltiel
Copy link

@jennybc I could reproduce a similar crash when trying to select the last sheet with this syntax:

readxl::read_xlsx(path, sheet=Inf)

This reprex appears to crash R.
See standard output and standard error for more details.

Standard output and error

-- nothing to show --

You can use any file, I used the following almost empty dummy table: test.xlsx.

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

No branches or pull requests

3 participants