From 2c95ec3bc86a9b7e0d4b65ff3723cd9dbb78fbc0 Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:07:30 -0800 Subject: [PATCH] Document Styling Whole Columns and Rows Fix #4285. Documentation change only - no changed code. It is not clear to me why using individual set options when styling an entire column works differently than applyFromArray, but the latter produces the expected result and the former doesn't. I will continue to research why. However, in the meantime, we can at least document that applyFromArray is preferred for this operation. --- docs/topics/recipes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/topics/recipes.md b/docs/topics/recipes.md index 8b27155d90..c768c49f7e 100644 --- a/docs/topics/recipes.md +++ b/docs/topics/recipes.md @@ -925,6 +925,8 @@ getStyle('A1:M500'), rather than styling the cells individually in a loop. This is much faster compared to looping through cells and styling them individually. +**Tip** If you are styling entire row(s) or column(s), e.g. getStyle('A:A'), it is recommended to use applyFromArray as described below rather than setting the styles individually as described above. + There is also an alternative manner to set styles. The following code sets a cell's style to font bold, alignment right, top border thin and a gradient fill: