Skip to content
Open
Show file tree
Hide file tree
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
21 changes: 12 additions & 9 deletions src/DoddleReport.OpenXml/DoddleReport.OpenXml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="ClosedXML, Version=0.68.1.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClosedXML.0.68.1\lib\net40-client\ClosedXML.dll</HintPath>
<Reference Include="ClosedXML, Version=0.92.1.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.92.1\lib\net40\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\DocumentFormat.OpenXml.1.0\lib\DocumentFormat.OpenXml.dll</HintPath>
<Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net40\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.0.3.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.0.3\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<Reference Include="FastMember.Signed, Version=1.3.0.0, Culture=neutral, PublicKeyToken=9e8f22703bef9a29, processorArchitecture=MSIL">
<HintPath>..\packages\FastMember.Signed.1.3.0\lib\net40\FastMember.Signed.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
Expand All @@ -66,10 +71,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="DoddleReport.OpenXml.nuspec" />
<None Include="packages.config" />
<None Include="web.config.transform" />
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/DoddleReport.OpenXml/ExcelReportWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ protected virtual void RenderRow(int rowCount, ReportRow reportRow, IXLRow dataR
field.DataStyle.CopyToXlStyle(cell.Style);
if (field.DataType == typeof(bool))
{
cell.SetDataType(XLCellValues.Boolean);
cell.SetDataType(XLDataType.Boolean);
cell.Value = reportRow[field];
}
else if (field.DataType.IsNumericType())
{
cell.SetDataType(XLCellValues.Number);
cell.SetDataType(XLDataType.Number);
if (!string.Equals("{0}", field.DataFormatString))
{
cell.Style.NumberFormat.Format = GetOpenXmlDataFormatString(field.DataFormatString);
Expand All @@ -194,7 +194,7 @@ protected virtual void RenderRow(int rowCount, ReportRow reportRow, IXLRow dataR
}
else if (field.DataType == typeof(DateTime) || field.DataType == typeof(DateTime?))
{
cell.SetDataType(XLCellValues.DateTime);
cell.SetDataType(XLDataType.DateTime);
cell.Value = reportRow.GetFormattedValue(field);
}
else
Expand All @@ -213,7 +213,7 @@ protected virtual void RenderRow(int rowCount, ReportRow reportRow, IXLRow dataR
if (field.ShowTotals)
{
var cell = dataRow.Cell(colCount);
cell.SetDataType(XLCellValues.Number);
cell.SetDataType(XLDataType.Number);
cell.FormulaA1 = string.Format(CultureInfo.InvariantCulture, "=SUM({0}{1}:{0}{2})", cell.Address.ColumnLetter, 2, rowCount - 1);
if (!string.Equals("{0}", field.DataFormatString))
{
Expand Down
6 changes: 4 additions & 2 deletions src/DoddleReport.OpenXml/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClosedXML" version="0.68.1" targetFramework="net40" />
<package id="DocumentFormat.OpenXml" version="1.0" />
<package id="ClosedXML" version="0.92.1" targetFramework="net40" />
<package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net40" />
<package id="ExcelNumberFormat" version="1.0.3" targetFramework="net40" />
<package id="FastMember.Signed" version="1.3.0" targetFramework="net40" />
</packages>