Comments (7)
Yes, you are right. This is a bug.
When having no StyleId on the cell, EPPlus takes the style from the row or the column. In this case the row. As the cell refers to StyleId 0, the wrong color is returned (FFFF0000 instead of theme Text1). I will provide a fix.
from epplus.
I think this issue might be the same as #1320 .
This issue is fixed in EPPlus 7.0.10.
from epplus.
Thanks! I'll give it a shot this afternoon and let you know.
from epplus.
Unfortunately this does not seem to be resolved with 7.0.10. I'm targeting .NET 8 if it makes a difference.
from epplus.
For completeness, I just tested as far back as 4.5.1 and no version seems to report the color correctly, which leads me wonder if/how the spreadsheet is malformed.
from epplus.
Looking at A2 in you workbook it has no StyleId Set...
<row r="2" spans="1:4" s="4" customFormat="1" x14ac:dyDescent="0.25">
<c r="A2" t="s">
<v>2</v>
</c>
<c r="B2"/>
<c r="C2"/>
<c r="D2"/>
</row>
This means A2 will reference to the xsfId 0 - fontId 0, in the styles.xml:
<font>
<sz val="11"/>
<color theme="1"/>
<name val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
</font>
```ยจ
theme="1" - is Text 1 - Black
Did you create this workbook with EPPlus? In that case can you provide the code necessary to create it?
from epplus.
No, this was made in Excel 2021
from epplus.
Related Issues (20)
- DefaultSubtotal Get/Set HOT 1
- Xamarin forms UWP problem: excel cannot open the file because the file format or file extension is not valid. HOT 8
- Removing a `CalculatedColumnFormula` resets cell styles for that column HOT 3
- GetRelativeFormula HOT 1
- EPPlus should adjust Workbook.View.ActiveTab after moving worksheets. HOT 1
- Issue with Excel Formula After copying ExcelRangeBase HOT 2
- Dimension for formulas/values only
- Double spaces are added when tokenizing intersect operator with preserve whitespace
- Support asynchronous reads/writes HOT 2
- SaveToText(FileInfo, ExcelOutputTextFormat) and SaveToTextAsync(FileInfo, ExcelOutputTextFormat) does not close the file. HOT 1
- Packages containing image files with an incorrect extension for the content type can fail on load. HOT 1
- Conditional Formatting on a Pivot Table does not save properly. HOT 2
- InsertRow causes exception in GetTokens
- EPPlus corrupts file after save HOT 2
- excel package view it in the Excel application without saving HOT 2
- Having a table address in a formula with escaped characters can corrupt the workbook.
- rPh and phoneticPr dont get added to sharedstrings in xml after saving.
- Cannot set the clockwise text rotation. HOT 2
- Getting XmlException when trying to access ExcelPackage's Workbook HOT 2
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 epplus.