Whehn openxlsx::createStyle get passed numFmt =NULL it raises and error Error in if (numFmt == "date") { : argument is of length zero (the error seems to be unrelated to "date", it's just that when numFmt is NULL the if statement cannot evaluate.
Fixed - when converting a style list to a S4 style object if the numFmt is NULL the code will pass "GENERAL" into openxlsx::createStyle for numFmt (which is the default)
Tracked bug down to here: https://github.com/moj-analytical-services/xltabr/blob/dc005be14e92a0a1715a76da45c010b5bc0c8b69/R/style_catalogue.R#L202
Whehn
openxlsx::createStyle
get passednumFmt =NULL
it raises and errorError in if (numFmt == "date") { : argument is of length zero
(the error seems to be unrelated to "date", it's just that when numFmt isNULL
the if statement cannot evaluate.To reproduce this error, use the following code:
Note output from
looks fine