You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xl_formula checks that all values in the vector start with an '=' to ensure that every value is a valid formula. However, if there are any NAs in the vector, even if every non na value starts with '=', the function call fails. Manually setting the class of a column to "c('xl_formula', 'xl_object)" has the behavior that all NAs are blank in the excel output, which to me seems to be the desired behavior.
I think this could be fixed by adding 'na.rm = T' to the 'all' call that checks for '=' at the start of every value.
reprex below:
formula<- paste0('=A', seq_len(5))
writexl::xl_formula(formula)
#> [:xl_formula:]#> =A1#> =A2#> =A3#> =A4#> =A5formula[1] <-NAwritexl::xl_formula(formula)
#> Error in writexl::xl_formula(formula): Formulas must start with '='
The text was updated successfully, but these errors were encountered:
xl_formula checks that all values in the vector start with an '=' to ensure that every value is a valid formula. However, if there are any NAs in the vector, even if every non na value starts with '=', the function call fails. Manually setting the class of a column to "c('xl_formula', 'xl_object)" has the behavior that all NAs are blank in the excel output, which to me seems to be the desired behavior.
I think this could be fixed by adding 'na.rm = T' to the 'all' call that checks for '=' at the start of every value.
reprex below:
The text was updated successfully, but these errors were encountered: