Skip to content
Advertisement

xlswriter formatting a range

In xlswriter, once a format is defined, how can you apply it to a range and not to the whole column or the whole row?

for example:

JavaScript

this gets applied it to the whole “B” column, but how can this “perc_fmt” applied to a range, for example, if I do:

JavaScript

it says:

JavaScript

Advertisement

Answer

Actually I found a workaround that avoids doing the loop. You just need to use the conditional formatting (that takes a range as an input) and just format all cases. For example:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement