Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/WebApiContrib.Formatting.Xlsx/XlsxMediaTypeFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public override Task WriteToStreamAsync(Type type, object value, System.IO.Strea
var metadata = ModelMetadataProviders.Current.GetMetadataForType(null, itemType);

var properties = (from p in itemType.GetProperties()
where p.CanRead & p.GetGetMethod().IsPublic & p.GetGetMethod().GetParameters().Length == 0
where p.CanRead && p.GetGetMethod().IsPublic && p.GetGetMethod().GetParameters().Length == 0
select p).ToList();


Expand Down Expand Up @@ -236,7 +236,7 @@ public override Task WriteToStreamAsync(Type type, object value, System.IO.Strea
else if (info.ExcelAttribute != null && info.ExcelAttribute.FalseValue != null && cellValue.Equals("False"))
row.Add(info.ExcelAttribute.FalseValue);

else if (!string.IsNullOrWhiteSpace(info.FormatString) & string.IsNullOrEmpty(info.ExcelNumberFormat))
else if (!string.IsNullOrWhiteSpace(info.FormatString) && string.IsNullOrEmpty(info.ExcelNumberFormat))
row.Add(string.Format(info.FormatString, cellValue));

else
Expand Down