Commit 91b7839a by 施晓雨

更新版本

parent 92f507a9
......@@ -78,27 +78,27 @@ namespace Kivii.Client.OfficeSample
Stopwatch watch = new Stopwatch();
watch.Start();
//创建个模板引擎
var template = new TemplateExcel();
var template = new TemplateWorkbook();
template.Open(tbxTemplateFileName.Text);//打开模板文件
template.Bind("contract", _contract);//将数据绑定到模板中,注意contract在模板中这是这个变量名了
template.Bind("task", _tasks);
var rtns =template.Fill();//填充模板
var rtns =template.Execute();//填充模板
var template2 = new TemplateExcel();
var template2 = new TemplateWorkbook();
template2.Open(tbxTemplateFileName2.Text);//打开模板文件
template2.Bind("contract", _contract);//将数据绑定到模板中,注意contract在模板中这是这个变量名了
template2.Bind("task", _tasks);
var rtns2 = template2.Fill();//填充模板
var rtns2 = template2.Execute();//填充模板
var template3 = new TemplateExcel();
var template3 = new TemplateWorkbook();
template3.Open(tbxTemplateFileName3.Text);//打开模板文件
template3.Bind("contract", _contract);//将数据绑定到模板中,注意contract在模板中这是这个变量名了
template3.Bind("task", _tasks);
var rtns3 = template3.Fill();//填充模板
var rtns3 = template3.Execute();//填充模板
//合并两个模板
template.Contact(template2.Package);
template.Contact(template3.Package);
template.Contact(template2.ExcelPackage);
template.Contact(template3.ExcelPackage);
template.SaveAs(saveFileName);//最后另存当前的文件
watch.Stop();
......
......@@ -32,14 +32,14 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Kivii.Common.V4.0, Version=5.4.2019.9250, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Common.5.4.2019.9250\lib\net40\Kivii.Common.V4.0.dll</HintPath>
<Reference Include="Kivii.Common.V4.0, Version=5.5.2020.9280, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Common.5.5.2020.9280\lib\net40\Kivii.Common.V4.0.dll</HintPath>
</Reference>
<Reference Include="Kivii.Core.V4.0, Version=5.4.2019.9250, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Core.5.4.2019.9250\lib\net40\Kivii.Core.V4.0.dll</HintPath>
<Reference Include="Kivii.Core.V4.0, Version=5.5.2020.7000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Core.5.5.2020.7000\lib\net40\Kivii.Core.V4.0.dll</HintPath>
</Reference>
<Reference Include="Kivii.Office.OpenXml.V4.0, Version=5.4.2019.10000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Office.OpenXml.5.4.2019.10000\lib\net40\Kivii.Office.OpenXml.V4.0.dll</HintPath>
<Reference Include="Kivii.Office.OpenXml.V4.0, Version=5.5.2020.10132, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Office.OpenXml.5.4.2019.10132\lib\net40\Kivii.Office.OpenXml.V4.0.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Kivii.Common" version="5.4.2019.9250" targetFramework="net40" />
<package id="Kivii.Core" version="5.4.2019.9250" targetFramework="net40" />
<package id="Kivii.Office.OpenXml" version="5.4.2019.10000" targetFramework="net40" />
<package id="Kivii.Common" version="5.5.2020.9280" targetFramework="net40" />
<package id="Kivii.Core" version="5.5.2020.7000" targetFramework="net40" />
<package id="Kivii.Office.OpenXml" version="5.4.2019.10132" targetFramework="net40" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment