Not clearing Enable Editing flag on an Excel file crashes RStudio (using read_xls())

Hi-
I built a Shiny app on 2 csv files and 2 Excel files. I replace the files every morning, and if I don't open the Excel files and click Enable Editing before running RStudio, then RStudio crashes. I am on a Windows 10 machine, using Office 2016, RStudio version 1.1.453.
Here's the offending code that pulls in the Excel files:

users <- read_xls("diversiondata/RCurrentUsers.xls", sheet = 1, range = cell_cols("A:F"))

unsheltered_completeness <-
  read_xls(
    "diversiondata/RDataQuality3.xls",
    sheet = 1,
    range = cell_cols("A:C")
  ) 
# between each of these, I have a mutate() statement that's irrelevant to all this (NOT piped, separate)
unsheltered_spdat_casemgrs <-
  read_xls(
    "diversiondata/RDataQuality3.xls",
    sheet = 2,
    range = cell_cols("A:C") 
  ) 

unsheltered_contacts <-
  read_xls(
    "diversiondata/RDataQuality3.xls",
    sheet = 3,
    range = cell_cols("A:C")
  ) 

unsheltered_referrals <-
  read_xls(
    "diversiondata/RDataQuality3.xls",
    sheet = 4,
    range = cell_cols("A:C")
  ) 

unsheltered_clients <-
  read_xls("diversiondata/RDataQuality3.xls",
           sheet = 5,
           range = cell_cols("A:G")) 

It all works great if I set the Excel files to Enable Editing, but why do I have to? I'm not writing to the files.

The message I get when it crashes is R Session Aborted. R encountered a fatal error. The session was terminated. "Start New Session"

What does your logs said? Where are you hosting the app?

It crashes on my local machine so I go in and do Enable Editing, and then push it to shinyapps.io. So there's no server log since by the time it gets to the server, I have applied the work-around to this problem.

It would help if you could share a reproducible example (the .xls file you are attempting to read, and the code specifically to read it)

The code above does recreate the problem, but I did not load the libraries I'm using, so here's that, and a smaller representative code block that does cause the problem:

library(readxl)
users <- read_xls("RCurrentUsers.xls", sheet = 1, range = cell_cols("A:F"))

Can I email you the file instead of post it publicly?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.