Skip to content
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

Set the BackgroundColor-Value of a cell to null #95

Open
mawagi7 opened this issue Aug 1, 2024 · 2 comments
Open

Set the BackgroundColor-Value of a cell to null #95

mawagi7 opened this issue Aug 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mawagi7
Copy link

mawagi7 commented Aug 1, 2024

Hi,

the initial "BackgroundColor"-value of a cell is null.

How can I reset a (red colored) cell?

Currently I'm able to set the background color to white ("#FFFFFF"). But in this case there is no border at the right and bottom.

Following call leaves the cell in red color:

Sheet.SetFormat(Sheet.Selection.Regions, new CellFormat() { BackgroundColor = null });

Is there any solution for this problem?

@anmcgrath
Copy link
Owner

Hi @mawagi7 this is an oversight by me, and it isn't currently possible.

For now, you could do:

Sheet.SetFormat(Sheet.Selection.Regions, new CellFormat() { BackgroundColor = " "});

and it won't show a bg color.

I'll work on a fix for this, thanks for the feedback.

@anmcgrath anmcgrath added the bug Something isn't working label Aug 5, 2024
@mawagi7
Copy link
Author

mawagi7 commented Aug 12, 2024

Thanks for the fast reply and your great work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants