Skip to content

set header background color using code #184

Open

Description

@emkoos

Hi. Is it possible to create styles for header using code when creating a file?

I found a solution using the event to set the AutoSizeColumns, but with the colors it doesn't work anymore, because the Save function overwrites them.

Activity

  1. mganss commented on Apr 22, 2022

    @mganss
    Owner

    The invocation of the Saving event happens right before the workbook is written so I'm surprised the style gets overwritten:

    Saving?.Invoke(this, new SavingEventArgs(sheet));
    Workbook.Write(stream);

    Have you already investigated where the overwriting occurs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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