1

I am trying to read a .xlsb spreadsheet in to a data frame, create a new data frame after performing some manipulations on the data frame previously read and then write the new data frame on a newly added worksheet in the same workbook and then close the workbook saving the file.

I have looked around and found a lot of packages to do so for all formats of workbooks except for .xlsb format. I found excel.link packages but couldn't get it to work.

I also read about a package called 'xlsb' but seemingly its not available for R version 4.1.2. If anyone knows if it works with an older or newer version of R, please advise and I will see if I can get that version installed at my workplace.

Any help/suggestions/pointers shall be greatly appreciated.

Best regards

Deepak

Deepak Agarwal
  • 387
  • 1
  • 4
  • 13
  • You can do it in python (e.g. https://stackoverflow.com/questions/45019778/read-xlsb-file-in-pandas-python) so perhaps you could use the [reticulate package](https://rstudio.github.io/reticulate/) to solve your problem, or just move that part of the analysis to python instead of R. If you only want to read xlsb files, the [readxlsb package](https://cran.r-project.org/web/packages/readxlsb/vignettes/read-xlsb-workbook.html) may be useful – jared_mamrot Feb 09 '22 at 01:56
  • This is a little off-topic, but I would suggest using something like [Anaconda](https://www.anaconda.com/)/[Miniconda](https://docs.conda.io/en/latest/miniconda.html) if you decide to upgrade/downgrade your R version (Minconda is a version of Anaconda with far less packages preinstalled. I would recommend it over Anaconda). It would allow you to use an older version of R for this particular task, but not have to worry about how it might impact your workflow elsewhere. They also usually don't need admin privileges to run either – user3124634 Feb 09 '22 at 03:21
  • Also, some previous threads [here](https://stackoverflow.com/questions/33321505/how-to-read-xlsb-files) and [here](https://stackoverflow.com/questions/28684199/how-to-open-an-xlsb-file-in-r) – user3124634 Feb 09 '22 at 03:24

0 Answers0