Skip to content
Prev 384098 / 398502 Next

read_excel() ignore case of worksheet name?

Ista, With few tweaks this worked beautifully.  Thank you so much.  

-----Original Message-----
From: Ista Zahn [mailto:istazahn at gmail.com] 
Sent: Tuesday, May 26, 2020 11:38 PM
To: Ravi Jeyaraman <ravi76 at gmail.com>
Cc: Erin Hodgess <erinm.hodgess at gmail.com>; r-help at r-project.org
Subject: Re: [R] read_excel() ignore case of worksheet name?

How about

read_excel_table <- function(x) {
  readxl::read_excel(
    x,
    sheet=grep("tables",
               excel_sheets(x),
               ignore.case = TRUE,
               value = TRUE),
    .name_repair = fixColNames
  )
}

lapply(SIS$FULL_FILEPATH, read_excel_table)


--Ista
On Tue, May 26, 2020 at 11:05 PM Ravi Jeyaraman <ravi76 at gmail.com> wrote: