Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error reporting: When complaining about sheet names, write ou… #414

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,13 @@ addWorksheet <- function(wb, sheetName,
stop("First argument must be a Workbook.")

if(tolower(sheetName) %in% tolower(wb$sheet_names))
stop("A worksheet by that name already exists! Sheet names must be unique case-insensitive.")
stop(paste0("A worksheet by the name '", sheetName, "' already exists! Sheet names must be unique case-insensitive."))

if(!is.logical(gridLines) | length(gridLines) > 1)
stop("gridLines must be a logical of length 1.")

if(nchar(sheetName) > 31)
stop("sheetName too long! Max length is 31 characters.")
stop(paste0("sheetName '", sheetName, "' too long! Max length is 31 characters."))

if(!is.null(tabColour))
tabColour <- validateColour(tabColour, "Invalid tabColour in addWorksheet.")
Expand Down