Skip to content

Commit

Permalink
fix overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tillwolff committed Apr 9, 2018
1 parent 4fd844f commit 6243c52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EPPlus.Html.Package/EPPlus.Html.Package.nuproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>
<PropertyGroup Label="Configuration">
<PackageId>EPPlus.Html</PackageId>
<PackageVersion Condition="'$(PackageVersion)' == ''">0.1.0</PackageVersion>
<PackageVersion Condition="'$(PackageVersion)' == ''">0.2.0</PackageVersion>
<Title>EPPlus.Html [Preview]</Title>
<Authors>Till Wolff</Authors>
<Owners>Till Wolff</Owners>
Expand All @@ -26,7 +26,7 @@
</PackageProjectUrl>
<PackageLicenseUrl>
</PackageLicenseUrl>
<Copyright>Copyright © Till Wolff 2017</Copyright>
<Copyright>Copyright © Till Wolff 2018</Copyright>
<PackageTags>EPPlus.Html EPPlus html export convert xlsx to html</PackageTags>
</PropertyGroup>
<PropertyGroup Label="Globals">
Expand Down
3 changes: 3 additions & 0 deletions EPPlus.Html/Converters/ExcelToCss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ internal static CssDeclaration ToCss(this ExcelRange excelRange)

css["max-width"] = excelColumn.Width + "em";
css["width"] = excelColumn.Width + "em";
css["overflow"] = excelRange.Worksheet.Cells[excelRange.End.Row, excelRange.End.Column + 1].Value != null ? "hidden" : null;

css.Update(excelRange.Style.ToCss());
}
return css;
Expand All @@ -41,6 +43,7 @@ internal static CssDeclaration ToCss(this ExcelStyle excelStyle)
var css = new CssDeclaration();
css["text-align"] = excelStyle.HorizontalAlignment.ToCssProperty();
css["background-color"] = excelStyle.Fill.BackgroundColor.ToHexCode();
css["overflow"] = excelStyle.HorizontalAlignment == ExcelHorizontalAlignment.Fill ? "hidden" : null;
css.Update(excelStyle.Font.ToCss());
css.Update(excelStyle.Border.ToCss());
return css;
Expand Down

0 comments on commit 6243c52

Please sign in to comment.