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

loadworkbook function returns error "Error in loadWorkbook(Pla_dolar, isUnzipped = TRUE) : object 'sheetrId' not found" #459

Open
GustavoEAvila opened this issue Dec 19, 2023 · 2 comments

Comments

@GustavoEAvila
Copy link

loadworkbook function returns error "Error in loadWorkbook(Pla_dolar, isUnzipped = TRUE) : object 'sheetrId' not found". I have tried with different files and different locations in my files to rule out any issue with the specific file or length of the location name.

This is the image of the error if it helps in any way....
image

Im running R version 4.3.2 "Eye Holes" on RStudio 2023.09.1+494 "Desert Sunflower" Release (cd7011dce393115d3a7c3db799dda4b1c7e88711, 2023-10-16) for windows

openxlsx package version 4.2.5.2

@Catherine-Celice
Copy link

I am sorry that I don't know how to fix this openxlsx code, but I do know how to work around it in my code.

My Excel files are NEVER zipped, but when using loadWorkbook(), I use the default argument "isUnzipped = FALSE".

For some reason this works. I have never tried to load a zipped file.

Both of these work even though the file IS unzipped:
wb <- loadWorkbook(summaryInputFilePath)
wb <- loadWorkbook(summaryInputFilePath, isUnzipped = FALSE)

@StevenHibble-Concurrence
Copy link
Contributor

It is unlikely that you want isUnzipped = TRUE. xlsx files are really just zip files in disguise. If you change the file extension to ".zip", you can extract the files to see the underlying structure. isUnzipped = TRUE is meant to be used when you have an unzipped directory of your xlsx file's internal contents.

With isUnzipped = FALSE (the default), loadWorkbook() unzips your xlsx and extracts the contents for you.

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