mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-12-02 03:47:41 +08:00
0.2.1
This commit is contained in:
parent
cb2d38dd4c
commit
46fae94f3f
@ -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
|
||||
|
36
drafts/【ExcelDataReader】Read wihout c r Attribute.linq
Normal file
36
drafts/【ExcelDataReader】Read wihout c r Attribute.linq
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user