Skip to content

Combinations of Styles #535

@ioannispetikas

Description

@ioannispetikas

I am experimenting with Demo10 and trying to understand how multiple styles work.
It seems that whenever we apply one style, it overwrites whatever style the range had before that.
So the question is: Can one style be applied to a range in addition to the previous styles of each cell, or do we have to create one style for each possible combination?
For instance, if I want:
... cells "A1:D1" to be bold
... cells "A2:D2" to be italic
... cells "A1:A3" to be dates (numberFormatId 14)
... cells "B1:B3" to be times (numberFormatId 20)
do I have to create 8 cellStyles (not counting the default style) and apply them independently like this?
... Style 1 - Cell A1: bold, date
... Style 2 - Cell A2: italic, date
... Style 3 - Cell B1: bold, time
... Style 4 - Cell B2: italic, time
... Style 5 - Cells C1, D1: bold, general
... Style 6 - Cells C2, D2: italic, general
... Style 7 - Cell A3: normal text, date
... Style 8 - Cell B3: normal text, time
... Default Style - Cells C3, D3 (and all the rest not mentioned)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions