awalker89 / openxlsx

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

Formatting alternate rows #472

Open stephanesq opened 5 years ago

stephanesq commented 5 years ago

Expected Behavior

I want to use the excel formula rule="MOD(LIGNE();2)" and rule="NON(MOD(LIGNE();2))" so that I have a different formatting for each row

Actual Behavior

The conditional formatting is not showing. It was present and could be manually activated in the Excel file at my office (which was not perfect). But now it is completely absent when I try to write the file on my mac

Steps to Reproduce the Problem

(please attach an example xlsx file if possible)

  1. I took from the vignettes examples `negStyle <- createStyle(fontColour = "#9C0006", bgFill = "#FFC7CE")

posStyle <- createStyle(fontColour = "#006100", bgFill = "#C6EFCE")

conditionalFormatting(fichier_excel, "Tableau1", cols=1:10, rows=1:11, rule="MOD(LIGNE();2)", type = "expression", style = negStyle)

conditionalFormatting(fichier_excel, "Tableau1", cols=1:10, rows=1:11, rule="NON(MOD(LIGNE();2))", style = posStyle) `

2.

3.

sessionInfo()