openxlsx icon indicating copy to clipboard operation
openxlsx copied to clipboard

Could `mergeCells` have the same behaviour as in Excel, i.e. merging AND centering effect by default?

Open olivier7121 opened this issue 1 year ago • 2 comments

olivier7121 avatar Sep 26 '22 21:09 olivier7121

I assume the answer is yes. All it would need would be a addStyle call with center on the merged cell. Would you like to create a pull request for this?

JanMarvin avatar Sep 26 '22 23:09 JanMarvin

Thanks for the quick reply, @JanMarvin.

Yes, that's what I did: I called mergeCells and then applied a centering style with addStyle. My proposal (and it was just an enhancement proposal, not an issue, I hope I got this right) was simply to embed this centering feature by default within mergeCells - so as to replicate the behaviour in Excel. Of course not a high priority request.

olivier7121 avatar Sep 27 '22 06:09 olivier7121