Closed olivier7121 closed 11 months ago
Hi @olivier7121 , thanks for the report. I assume that you did not want the hyperlink color and font to be modified?
Most likely that's because the dxfs xml string is created with to many arguments.
"<dxf>
<font>
<color rgb=\"FF000000\"/>
<name val=\"Calibri\"/>
<sz val=\"11\"/>
</font>
<fill>
<patternFill patternType=\"solid\">
<bgColor rgb=\"FFBFBFBF\"/>
</patternFill>
</fill>
</dxf>"
instead of
<dxf>
<font/>
<fill>
<patternFill patternType=\"solid\">
<bgColor rgb=\"FFBFBFBF\"/>
</patternFill>
</fill>
</dxf>
Thanks for the quick reply, @JanMarvin.
Your assumption is right: I didn't want the font color to be modified. I wanted exactly the same behaviour as the one we get when doing this with Excel (i.e. 'superimpose' mode and not 'replace' mode).
As I wrote in my first message, it is very similar (if not the same) to the stack = TRUE
parameter of the addStyle
function of openxlsx
.
I have raised an issue with openxlsx2
where I can simply solve this (a workaround is already in the issue). In openxlsx
it could be solvable too, but even I have time restrictions 😄 .
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
The function
conditionalFormatting
replaces the other applied styles (which is not the behaviour expected and observed in Excel). Unlike functionaddStyle
, there is currently no parameterstack = TRUE
to prevent that.Reproducible example (also available on this page of stackoverflow - reprex #2):
R version 4.2.1
openxlsx
version 4.2.5