Skip to content

Commit

Permalink
4.9.1
Browse files Browse the repository at this point in the history
4.9.1

_CopyStyle() fixed;
  • Loading branch information
SergiyStoyan committed Jun 10, 2023
1 parent 1dba07a commit 947065f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CliverExcel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Copyright>Sergiy Stoyan</Copyright>
<Authors>Sergiy Stoyan</Authors>
<Company>CliverSoft</Company>
<Version>4.9.0</Version>
<Version>4.9.1</Version>
<PackageProjectUrl>https://github.com/sergiystoyan/CliverExcel</PackageProjectUrl>
<Description>Excel routines</Description>
<PackageTags>Excel routines</PackageTags>
Expand Down
4 changes: 1 addition & 3 deletions Npoi/ExcelExtensions.workbook.style.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static public ICellStyle _CopyStyle(this IWorkbook workbook, ICellStyle fromStyl
toStyle.SetFont(f1);
else
{
IFont f2 = workbook._GetRegisteredFont(f1);
IFont f2 = toStyleWorkbook._GetRegisteredFont(f1);
toStyle.SetFont(f2);
}
return toStyle;
Expand Down Expand Up @@ -487,7 +487,6 @@ static public IFont _CreateUnregisteredFont(this IWorkbook workbook)
if (workbook is HSSFWorkbook)
return new HSSFFont(0, new NPOI.HSSF.Record.FontRecord());
throw new Exception("Unsupported workbook type: " + workbook.GetType().FullName);
//return workbook.NumberOfFonts > 0 ? workbook.GetFontAt(0).CreateCloneByJson() : null;
}

/// <summary>
Expand All @@ -500,7 +499,6 @@ static public ICellStyle _CloneUnregisteredStyle(this IWorkbook workbook, ICellS
{
ICellStyle toStyle = workbook._CreateUnregisteredStyle();
return workbook._CopyStyle(fromStyle, toStyle, cloneStyleWorkbook);
//return fromStyle.CreateCloneByJson();
}

/// <summary>
Expand Down

0 comments on commit 947065f

Please sign in to comment.