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

fixed problem with characters #89

Merged
merged 1 commit into from
Oct 12, 2017
Merged
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
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