Skip to content

Commit e289665

Browse files
committed
EPPlus version 7.1.0-Final
1 parent 6876aa2 commit e289665

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

src/EPPlus/EPPlus.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0;net462;net35</TargetFrameworks>
44
<AssemblyVersion>7.1.0.0</AssemblyVersion>
5-
<FileVersion>7.10.0.0</FileVersion>
6-
<Version>7.10.0</Version>
5+
<FileVersion>7.1.0.0</FileVersion>
6+
<Version>7.1.0</Version>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
88
<PackageProjectUrl>https://epplussoftware.com</PackageProjectUrl>
99
<Authors>EPPlus Software AB</Authors>
@@ -381,8 +381,9 @@
381381
A list of fixed issues can be found here https://epplussoftware.com/docs/7.0/articles/fixedissues.html
382382

383383
Version history
384-
7.0.10 20240311 Minor bug fixes. See https://epplussoftware.com/Developers/MinorFeaturesAndIssues.
385-
7.0.9 20240215 Minor bug fixes.
384+
7.1.0 20240328 Html export of Conditional formatting, Performance RichText, LoadFromCollection Enhancements. See https://epplussoftware.com/Developers/MinorFeaturesAndIssues.
385+
7.0.10 20240311 Minor bug fixes.
386+
7.0.9 20240215 Minor bug fixes.
386387
7.0.8 20240124 Minor bug fixes.
387388
7.0.7 20240119 Minor bug fixes.
388389
7.0.6 20240110 Minor bug fixes.

src/EPPlus/Style/RichText/ExcelRichTextCollection.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ExcelRichTextCollection : IEnumerable<ExcelRichText>
3333
List<ExcelRichText> _list = new List<ExcelRichText>();
3434
internal ExcelRangeBase _cells = null;
3535
internal ExcelWorkbook _wb;
36-
36+
internal bool _isComment=false;
3737
internal ExcelRichTextCollection(ExcelWorkbook wb, ExcelRangeBase cells)
3838
{
3939
_wb = wb;
@@ -79,8 +79,9 @@ internal ExcelRichTextCollection(XmlNamespaceManager ns, XmlNode textElem, Excel
7979
{
8080
_wb = cells._workbook;
8181
_cells= cells;
82+
_isComment = true;
8283

83-
foreach(XmlNode rElement in textElem.ChildNodes)
84+
foreach (XmlNode rElement in textElem.ChildNodes)
8485
{
8586
if(rElement.LocalName == "r")
8687
{
@@ -194,8 +195,11 @@ public ExcelRichText Insert(int index, string text)
194195
{
195196
rt.Color = Color.FromArgb(hex);
196197
}
197-
_cells._worksheet._flags.SetFlagValue(_cells._fromRow, _cells._toCol, true, CellFlags.RichText);
198-
_cells.SetIsRichTextFlag(true);
198+
if (_isComment == false)
199+
{
200+
_cells._worksheet._flags.SetFlagValue(_cells._fromRow, _cells._toCol, true, CellFlags.RichText);
201+
_cells.SetIsRichTextFlag(true);
202+
}
199203
}
200204
_list.Insert(index, rt);
201205
return rt;
@@ -207,9 +211,9 @@ public ExcelRichText Insert(int index, string text)
207211
public void Clear()
208212
{
209213
_list.Clear();
210-
if (_cells != null)
214+
if (_cells != null && _isComment == false)
211215
{
212-
_cells.DeleteMe(_cells, false, true, true, true, false, true, false, false, false);
216+
_cells.DeleteMe(_cells, false, true, true, true, false, true, false, false, false);
213217
_cells.SetIsRichTextFlag(false);
214218
}
215219
}
@@ -220,7 +224,7 @@ public void Clear()
220224
public void RemoveAt(int Index)
221225
{
222226
_list.RemoveAt(Index);
223-
if (_cells != null && _list.Count == 0) _cells.SetIsRichTextFlag(false);
227+
if (_cells != null && _list.Count == 0 && _isComment == false) _cells.SetIsRichTextFlag(false);
224228
}
225229
/// <summary>
226230
/// Removes an item
@@ -229,7 +233,7 @@ public void RemoveAt(int Index)
229233
public void Remove(ExcelRichText Item)
230234
{
231235
_list.Remove(Item);
232-
if (_cells != null && _list.Count == 0) _cells.SetIsRichTextFlag(false);
236+
if (_cells != null && _list.Count == 0 && _isComment == false) _cells.SetIsRichTextFlag(false);
233237
}
234238
/// <summary>
235239
/// The text

0 commit comments

Comments
 (0)