Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
fixed problem with characters
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinL committed Oct 12, 2017
1 parent 3c86929 commit 398472a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions R/style_catalogue.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,20 @@ style_catalogue_xlsx_import <- function(tab) {
next
}

# tmp_list <- list()
# tmp_list$style <- i$style

# cell <- openxlsx::readWorkbook(wb, rows = r, cols = c + 1, colNames = FALSE, rowNames = FALSE)
# tmp_list$rowHeight <- cell[1, 1]
#See https://github.com/moj-analytical-services/xltabr/issues/88
value <- as.character(value)

style_list <- convert_style_object(i$style)
style_key <- create_style_key(style_list)

if (!value %in% names(tab$style_catalogue)){
tab$style_catalogue[[value]] <- style_key
}
tab$style_catalogue[[value]] <- style_key
}
}

# Add in a checker to catch default style objects
for (style_name in listed_styles$X1){
if (!style_name %in% names(tab$style_catalogue)){
value <- as.character(value)
tab$style_catalogue[[style_name]] <- create_style_key(convert_style_object(openxlsx::createStyle()))
}
}
Expand Down

0 comments on commit 398472a

Please sign in to comment.