Error: openxlsx can only read .xlsx files while reading .xslm file in R

1k views Asked by At
library(tidyverse)
library(openxlsx)
library(lubridate)
library(readxl)

source("global_config.R")


inputFile <- "../data/census.xlsm"
peopleData <-read.xlsx(inputFile, sheet = "peopleData", startRow = 16 )
view(peopleData)

I am getting the following error Error: openxlsx can only read .xlsx files openxls version 4.2.4 readxl version 1.3.1

1

There are 1 answers

0
DormantAscospore On

Try using the read.xlsx2() function, described in more detail here: http://cran.r-project.org/web/packages/xlsx/xlsx.pdf