[R] [FORGED] Re: read_excel() ignore case of worksheet name?

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Wed May 27 05:40:48 CEST 2020


There is a function excel_sheets() in the readxl package which will tell 
you the names of the sheets.

Using that you should probably be able to take the appropriate evasive 
action.

cheers,

Rolf Turner

On 27/05/20 2:59 pm, Ravi Jeyaraman wrote:
> I’ve already tried that and doesn’t work
> 
>   
> 
> From: Erin Hodgess [mailto:erinm.hodgess using gmail.com]
> Sent: Tuesday, May 26, 2020 10:55 PM
> To: Ravi Jeyaraman <ravi76 using gmail.com>
> Cc: r-help using r-project.org
> Subject: Re: [R] read_excel() ignore case of worksheet name?
> 
>   
> 
> Here’s a thought, please.  Could you use the tolower function and make them all lower case?
> 
>   
> 
> Thanks,
> 
> Erin
> 
>   
> 
> On Tue, May 26, 2020 at 8:21 PM Ravi Jeyaraman <ravi76 using gmail.com <mailto:ravi76 using gmail.com> > wrote:
> 
> Hello All, Is there any parameter to make read_excel() ignore the case-sensitiveness of the worksheet?   I'm using the below to ready in multiple spreadsheets and it works perfectly fine if the worksheet is named 'Tables', but fails when it's named ' TABLES'.  Any thoughts?
> 
> lapply(1:nrow(SIS), function(x) readxl::read_excel(SIS$FULL_FILEPATH[x], sheet='Tables', .name_repair = fixColNames))
> 
> Thanks in advance for your response.
> 
> Cheers
> Ravi



More information about the R-help mailing list