Skip to content

Commit

Permalink
Merge pull request #20 from WeihanLi/develop
Browse files Browse the repository at this point in the history
 add excel setting for *.xlsx files
  • Loading branch information
rigofunc authored Mar 12, 2018
2 parents c7e79f3 + 6d2adb3 commit 18ed6dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Extensions/IEnumerableNpoiExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ internal static IWorkbook ToWorkbook<T>(this IEnumerable<T> source, IWorkbook wo
}

var titleCell = titleRow.CreateCell(index);
if (titleStyle != null)
if (titleStyle != null)
{
titleCell.CellStyle = titleStyle;
}
Expand Down Expand Up @@ -368,6 +368,11 @@ private static IWorkbook InitializeWorkbook(string excelFile)

_formulaEvaluator = new XSSFFormulaEvaluator(workbook);

var props = workbook.GetProperties();
props.CoreProperties.Creator = setting.Author;
props.CoreProperties.Subject = setting.Subject;
props.ExtendedProperties.GetUnderlyingProperties().Company = setting.Company;

return workbook;
}
}
Expand Down

0 comments on commit 18ed6dd

Please sign in to comment.