mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-12-03 12:27:41 +08:00
93aee8d5d9
drafts\【CloseXml】Read.linq drafts\【ClosedXml】Create by IEnumerable.linq drafts\【ClosedXml】Read.linq drafts\【EPPlus】Create by IEnumerable.linq drafts\【OpenXmlSDK】Create by IEnumerable.linq drafts\【OpenXmlSDK】Read.linq
29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
<Query Kind="Program">
|
|
<NuGetReference>AngleSharp</NuGetReference>
|
|
<NuGetReference>ClosedXML</NuGetReference>
|
|
<NuGetReference>Dapper</NuGetReference>
|
|
<NuGetReference>DocumentFormat.OpenXml</NuGetReference>
|
|
<NuGetReference>Newtonsoft.Json</NuGetReference>
|
|
<NuGetReference>System.Data.SqlClient</NuGetReference>
|
|
<Namespace>Dapper</Namespace>
|
|
<Namespace>Newtonsoft.Json</Namespace>
|
|
<Namespace>System.Data.SqlClient</Namespace>
|
|
<Namespace>System.Net.Http</Namespace>
|
|
<Namespace>System.Threading.Tasks</Namespace>
|
|
<Namespace>ClosedXML.Excel</Namespace>
|
|
</Query>
|
|
|
|
void Main()
|
|
{
|
|
Stopwatch sw = new Stopwatch();
|
|
sw.Start();
|
|
Console.WriteLine("start memory usage: " +System.Diagnostics.Process.GetCurrentProcess().WorkingSet64 / (1024 * 1024) + $"MB");
|
|
|
|
var path = @"D:\git\MiniExcel\samples\xlsx\Test1,000,000x10\Test1,000,000x10.xlsx";
|
|
using (var workbook = new XLWorkbook(path))
|
|
{
|
|
Console.WriteLine("A1 : " + workbook.Worksheets.First().Cell(1,1).Value);
|
|
Console.WriteLine("end memory usage: " +System.Diagnostics.Process.GetCurrentProcess().WorkingSet64 / (1024 * 1024) + $"MB & run time : {sw.ElapsedMilliseconds}ms");
|
|
}
|
|
}
|