-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Excel only supports up to 255 characters in a formula, but we may write more than that. I would suggest we implement the suggested use of the =CONCATENTATE() function to break up longer strings.
To see the issue in Excel directly, put this formula in: ="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" (256 characters of "A")
library(writexl)
# Excel allows a maximum of 255 characters in a formula
d <- data.frame(A = xl_formula(paste0('="', paste(rep("A", 256), collapse = ""), '"')))
# This file will open with an error because only 255 characters are allowed in a
# formula.
check_file_long_formula <- write_xlsx(d)Created on 2025-09-15 with reprex v2.1.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels