This commit is contained in:
wei 2021-03-17 08:45:12 +08:00
parent cb2d38dd4c
commit 46fae94f3f
2 changed files with 39 additions and 1 deletions

View File

@ -3,7 +3,9 @@
## Release Notes
### 0.2.1
- Optimize bool and datetime auto check
- Optimize type mapping bool and datetime auto check
- Query Support xl/worksheets/Sheet Xml Xml `<c>` without `r` attribute or without `<dimension>` but `<c>` with `r` attribute, but now performance is slow than with dimension ([](https://github.com/shps951023/MiniExcel/issues/2))
### 0.2.0
- Release to nuget.org

View File

@ -0,0 +1,36 @@
<Query Kind="Program">
<NuGetReference>AngleSharp</NuGetReference>
<NuGetReference>Dapper</NuGetReference>
<NuGetReference>DocumentFormat.OpenXml</NuGetReference>
<NuGetReference>ExcelDataReader</NuGetReference>
<NuGetReference>ExcelDataReader.DataSet</NuGetReference>
<NuGetReference>Newtonsoft.Json</NuGetReference>
<NuGetReference>System.Data.SqlClient</NuGetReference>
<Namespace>Dapper</Namespace>
<Namespace>ExcelDataReader</Namespace>
<Namespace>Newtonsoft.Json</Namespace>
<Namespace>System.Data.SqlClient</Namespace>
<Namespace>System.Net.Http</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
void Main()
{
Stopwatch sw = new Stopwatch();
sw.Start();
Console.WriteLine("start memory usage: " + System.Diagnostics.Process.GetCurrentProcess().WorkingSet64 / (1024 * 1024) + $"MB");
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
var path = @"D:\git\MiniExcel\samples\xlsx\TestWihoutRAttribute.xlsx";
using (var stream = File.OpenRead(path))
using (var reader = ExcelReaderFactory.CreateReader(stream))
{
while (reader.Read())
{
for (var i = 0; i < reader.FieldCount; i++)
Console.Write($"| {reader.GetValue(i)?.GetType()?.Name}:{reader?.GetValue(i)} |");
Console.WriteLine();
}
Console.WriteLine("end memory usage: " + System.Diagnostics.Process.GetCurrentProcess().WorkingSet64 / (1024 * 1024) + $"MB & run time : {sw.ElapsedMilliseconds}ms");
}
}