awalker89 / openxlsx

R package for .xlsx file reading and writing.
Other
364 stars 79 forks source link

Error in read.xlsx.default: basic_string #381

Open atanasj opened 6 years ago

atanasj commented 6 years ago

Expected Behavior

Load xlsx file.

Actual Behavior

Following error is provided:

Error in read.xlsx.default("~/Google Drive/PhD/PR_Study_2_databank/20171117 Databank/GPHprotocol1v0.1.1.xlsx", : basic_string
    3. stop(structure(list(message = "basic_string", call = read.xlsx.default("~/Google Drive/PhD/PR_Study_2_databank/20171117 Databank/GPHprotocol1v0.1.1.xlsx", detectDates = TRUE), cppstack = NULL), class = c("std::out_of_range", "C++Error", "error", "condition")))
    2. read.xlsx.default("~/Google Drive/PhD/PR_Study_2_databank/20171117 Databank/GPHprotocol1v0.1.1.xlsx", detectDates = TRUE)
    1. read.xlsx("~/Google Drive/PhD/PR_Study_2_databank/20171117 Databank/GPHprotocol1v0.1.1.xlsx", detectDates = TRUE)  

Running the syntax without detectDates = TRUE works as expected. This seems to be the same issues as #242.

Steps to Reproduce the Problem

(please attach an example xlsx file if possible)

The following syntax is entered into R:

library("openxlsx")
GPHprot1 <- read.xlsx("~/Google Drive/PhD/PR_Study_2_databank/20171117 Databank/GPHprotocol1v0.1.1.xlsx", detectDates = TRUE)

I cannot provide an xlsx file.

sessionInfo()

> packageVersion('openxlsx')
[1] ‘4.0.17’