This commit is contained in:
WeiLin 2022-09-02 18:39:35 +08:00
parent b2fe9cd084
commit dabf90c852
6 changed files with 19 additions and 3 deletions

View File

@ -22,6 +22,9 @@
---
### 1.26.6
- [OPT] Template save performance #425 (via @Rollerss)
### 1.26.5
- [New] Added DataReader AutoFilter toggle #402 #401 (via @Rollerss)
- [New] SaveAs support empty sharedstring #405

View File

@ -25,6 +25,9 @@
---
### 1.26.6
- [OPT] Template save performance #425 (via @Rollerss)
### 1.26.5
- [New] Added DataReader AutoFilter toggle #402 #401 (via @Rollerss)
- [New] SaveAs 支持空白 sharedstring #405

View File

@ -24,6 +24,9 @@
---
### 1.26.6
- [OPT] Template save performance #425 (via @Rollerss)
### 1.26.5
- [New] Added DataReader AutoFilter toggle #402 #401 (via @Rollerss)
- [New] SaveAs 支持空白 sharedstring #405

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0;net5.0</TargetFrameworks>
<Version>1.26.5</Version>
<Version>1.26.6</Version>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>MiniExcel</AssemblyName>

View File

@ -11,6 +11,10 @@
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MiniExcel\MiniExcelLibs.csproj" />
</ItemGroup>

View File

@ -9,6 +9,8 @@ using System.IO;
using System.Net;
using MiniExcelLibs;
using Microsoft.AspNetCore.Http;
using System.Text.Json.Serialization;
using Newtonsoft.Json;
public class Program
{
@ -139,11 +141,12 @@ public class ApiController : Controller
var stream = new MemoryStream();
excel.CopyTo(stream);
var result = new List<dynamic>();
foreach (var item in stream.Query(true))
{
// do your logic etc.
result.Add(item);
}
return Ok("File uploaded successfully");
return Ok("File uploaded successfully\ndata:"+ JsonConvert.SerializeObject(result));
}
}