File tree Expand file tree Collapse file tree
tests/MiniExcel.Tests.AspNetCore Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323---
2424
25+ ### 1.26.6
26+ - [ OPT] Template save performance #425 (via @Rollerss )
27+
2528### 1.26.5
2629- [ New] Added DataReader AutoFilter toggle #402 #401 (via @Rollerss )
2730- [ New] SaveAs support empty sharedstring #405
Original file line number Diff line number Diff line change 2525
2626---
2727
28+ ### 1.26.6
29+ - [ OPT] Template save performance #425 (via @Rollerss )
30+
2831### 1.26.5
2932- [ New] Added DataReader AutoFilter toggle #402 #401 (via @Rollerss )
3033- [ New] SaveAs 支持空白 sharedstring #405
Original file line number Diff line number Diff line change 2424
2525---
2626
27+ ### 1.26.6
28+ - [ OPT] Template save performance #425 (via @Rollerss )
29+
2730### 1.26.5
2831- [ New] Added DataReader AutoFilter toggle #402 #401 (via @Rollerss )
2932- [ New] SaveAs 支持空白 sharedstring #405
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
33 <TargetFrameworks >net45;netstandard2.0;net5.0</TargetFrameworks >
4- <Version >1.26.5 </Version >
4+ <Version >1.26.6 </Version >
55 </PropertyGroup >
66 <PropertyGroup >
77 <AssemblyName >MiniExcel</AssemblyName >
Original file line number Diff line number Diff line change 1111 <None Remove =" wwwroot\**" />
1212 </ItemGroup >
1313
14+ <ItemGroup >
15+ <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1" />
16+ </ItemGroup >
17+
1418 <ItemGroup >
1519 <ProjectReference Include =" ..\..\src\MiniExcel\MiniExcelLibs.csproj" />
1620 </ItemGroup >
Original file line number Diff line number Diff line change 99using System . Net ;
1010using MiniExcelLibs ;
1111using Microsoft . AspNetCore . Http ;
12+ using System . Text . Json . Serialization ;
13+ using Newtonsoft . Json ;
1214
1315public class Program
1416{
@@ -139,11 +141,12 @@ public IActionResult UploadExcel(IFormFile excel)
139141 var stream = new MemoryStream ( ) ;
140142 excel . CopyTo ( stream ) ;
141143
144+ var result = new List < dynamic > ( ) ;
142145 foreach ( var item in stream . Query ( true ) )
143146 {
144147 // do your logic etc.
148+ result . Add ( item ) ;
145149 }
146-
147- return Ok ( "File uploaded successfully" ) ;
150+ return Ok ( "File uploaded successfully\n data:" + JsonConvert . SerializeObject ( result ) ) ;
148151 }
149152}
You can’t perform that action at this time.
0 commit comments