Comments (5)
Hi
Thank you for the report. I will have a look at this ASAP.
But it could be that we have a reference problem here (probably a bug) with the Basic Styles. The styles are stored as references not values, and redefining BasicStyles.ColorizedBackground may override all references in the cells.
As quick fix, you could try to use the copy function of the style class to create two distinct styles instead of of using BasicStyle.ColorizedBackground directly.
But like said, I will look into it.
from picoxlsx.
Gave that a quick test, same results
Style evenStyle = new Style().CurrentFill.BackgroundColor = "a6a1a1";
Style diffStyle = new Style();
diffStyle.CurrentBorder.BottomStyle = Style.Border.StyleValue.medium;
diffStyle.CurrentBorder.BottomColor = "bf6262";
workbook.CurrentWorksheet.AddCellRange(data, new Cell.Address(0, idx), new Cell.Address(data.Count - 1, idx), evenStyle);
workbook.CurrentWorksheet.GetCell(2, idx).SetStyle(diffStyle);
from picoxlsx.
Mighty embarrassing... I had a variable mistyped in some supporting code that my breakpoints weren't capturing.
I apologize for wasting your time. Thank you for the repo!
from picoxlsx.
No Problem.
I know that the style section is quite complicated und not very well documented. A rewriting is ongoing since some months. But it will take probably some additional months until it can be released.
Please let me know if you find inconveniences, problems or bugs. Thank you.
from picoxlsx.
So I'm doing this below:
Style style1 = new Style();
style1.CurrentFill.BackgroundColor = "00ff00";
Style style2 = new Style();
And then I write some cells with an explicit style of either default or style1 or style2. The cells I'm expecting to have a colored background, because of style1, do not.
from picoxlsx.
Related Issues (20)
- Custom Cell Style question HOT 2
- SaveAsStream closes the Stream HOT 3
- custom cell style for dates HOT 2
- Is it possible to insert an `Image` Cell ? HOT 2
- Merged cells style border lost? HOT 8
- Webapi how return workbook HOT 5
- Bug SetWoorkbookProtection HOT 2
- Features request HOT 2
- good job HOT 1
- --
- Do you have a Plan to read excel file? HOT 2
- Is it possible to create cell notes? HOT 2
- Is it possible to add the autofit feature? HOT 4
- Tab Color HOT 1
- What about basic read access? HOT 3
- Setting a custom column width doesn't work HOT 1
- Setting the value type in the Cell constructors doesn't work HOT 4
- Style.BasicStyles.ColorizedText is not working HOT 3
- Cells' style are not retain when merging cells HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picoxlsx.