-
Notifications
You must be signed in to change notification settings - Fork 194
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
Error in read_fun(path = path, sheet = sheet, limits = limits, shim = shim, : std::bad_alloc #373
Comments
So you're saying you have a The problems you report re: ignoring last column and complaining about mismatched Any chance you can provide this file to me? How was it created, i.e. was it Excel or some other tool? The last column thing makes me suspect Excel did not make this file ... |
I'm afraid, I cannot share the file but yes the file was generated using Neware btsda software |
There's little I can do w/o the file because there's not enough information to go on. Can you open this file in Excel and resave as I'm also still interested in confirmation or clarification on this:
|
Yes
When I resave it as |
OK thanks. I think that suggests the v1.0.0 fix for dropping the last column for some non-Excel-written But again not sure I can do anything about this without a single specimen to inspect. |
I'm attaching a sample file. I hope it helps. |
I get same error, even fro very small ranges. Here is the code, sheets attached. require(readxl) worksres<-read_xls( worksres<-read_xls( does not workres<-read_xls( |
It's a problem with XLS sheets that contain 65536 rows. Current code enters an infinite loop in that case (65535 + 1 wraps around to 0 when using 16-bit counters), and all available memory gets eventually exhausted I guess. I've submitted a pull request that will hopefully resolve this. |
@nassuphis I can't open bad_sheet5. But, after the fix in #432, I can read bad_sheet4 and get Once I merge #432 and close this issue, please re-install the dev version of readxl from GitHub. If your problem persists, please open a new issue. |
* Prevent infinite loop reading xls w/ 65536 rows Fixes #373 * Add NEWS bullet
I have an excel file with multiple sheets and each sheet more than 65000 rows. I get the above mentioned error with the latest version (1.0.0) of the package when I try
read_excel(path = x, sheet = y, col_names = T)
and when I try by downgrading the package with the same code it is ignoring one of the column. I have few timestamp columns so when I try by addingcol_types = c(rep("text"), 11)
it throwing me an error sayingError in xls_cols(path, sheet, col_names = col_names, col_types = col_types, : col_names and col_types must have the same length
When I clearly have 11 columns.I'm using 16gb machine and i7 processor, I guess RAM size should not be an issue here.
The text was updated successfully, but these errors were encountered: