awalker89 / openxlsx

R package for .xlsx file reading and writing.
Other
364 stars 78 forks source link

Strikethrough font decoration not recognized #403

Open Havimo opened 6 years ago

Havimo commented 6 years ago

Expected Behavior

When looking at the list of Styles, I would expect 'STRIKEOUT' to appear in the fontDecoration field of a style object for cells that have been formatted with a strikethrough

Actual Behavior

the 'STRIKEOUT' never appears, but BOLD, ITALIC and UNDERLINE work.

Steps to Reproduce the Problem

(please attach an example xlsx file if possible)

  1. load the attached workbook test font.xlsx

  2. run the following piece of code

wb <- loadWorkbook(file.name)
style.list <- wb$styleObjects
fontdecoration <- c()
for(i in 1:length(style.list)){
  fontdecoration <- c(fontdecoration,paste(style.list[[i]]$style$fontDecoration,collapse = ','))
}
fontdecoration <- unique(fontdecoration)
fontdecoration

sessionInfo()

neros commented 4 years ago

I'd like to confirm the issue: creating a style using: createStyle(textDecoration = "strikeout") does not contain a "strikeout" value textDecoration strikewb$styleObjects[[x]]$style$fontDecoration = character(0)