-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worksheet global styles & row styles #53
Comments
Thank you for the feedback! One thing that needs to be decided upon is what should happen if e.g. a custom font was set globally, and another style with only a fill color set was used on a cell. Right now I think the expectation would be that the cell would get both the custom font from the global style and the fill color from the other style. In that case we would have to make sure there is also a way to avoid using the global style for a cell. It shouldn't be necessary to create duplicate styles the way things work now. You should be able to create the styles you need once, and then pass |
Fully agree. Also what to do in case of conflict? For example global font size is 10 but I specify font size 12 for a cell. In this case I expect cell styles to have higher priority.
I mean I have to duplicate global styles in each style declaration. Not a problem at all, just nice to have.
|
Yes I agree. The most specific font size should be used.
Ah, I see. var defaultStyle = new Style();
defaultStyle.Font.Size = 14;
var someCellStyle = defaultStyle with
{
Font.Bold = true
}; |
@sveinungf, So sweet and neat option! Thanks! |
Hello! First of all, thank you very much for such a wonderful library. I really appreciate your work.
Maybe I didn't look well, but I didn't find a way to set global styles for the entire worksheet or for an entire row.
Use case:
I have the same font and font size for the entire worksheet. In addition some rows are bold. Specifying styles only at the cell level results in duplicate styles.
The text was updated successfully, but these errors were encountered: