How to open an .xlsb file in R?
r, xlsb
Solution
Use the `RODBC` package:
library(RODBC)
wb <- "D:\\Data\\Masked Data.xlsb" # Give the file name
con2 <- odbcConnectExcel2007(wb)
data <- sqlFetch(con2, "Sheet1$") # Provide name of sheet
nrow(data)
Problem
I'm trying to open an .xlsb file in R and keep getting similar errors. Any recommendations on how to solve this issue without having to download the data and save it in a different formate? ``` read.xlsx(paste(OutputLocation,FileName, sep=""), sheetName = "Master Data") ``` Error messages: Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : org.apache.poi.xssf.XLSBUnsupportedException: .XLSB Binary Workbooks are not supported ``` rigDataWB<-loadWorkbook(paste(OutputLocation,FileName, sep="")) ``` Error messages: Error: XLSBUnsupportedException (Java): .XLSB Binary Workbooks are not supported Please note: I cannot install Perl libraries. I'm running 64bit R. Reference: http://www.milanor.net/blog/?p=779 My data is from: http://phx.corporate-ir.net/phoenix.zhtml?c=79687&p=irol-reportsother