Created
May 28, 2023 11:57
-
-
Save jahav/505d679ebc5b06a1adb1901498ae1b46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using var wb = new XLWorkbook(); | |
var ws = wb.AddWorksheet(); | |
var data = Enumerable.Range(0, 500000).Select(x => new | |
{ | |
One = 1, | |
Two = 2, | |
Three = 3, | |
Four = 3.14, | |
Five = true, | |
Six = false, | |
Seven = "Hello", | |
Eight = Blank.Value | |
}); | |
var ss = Stopwatch.StartNew(); | |
ws.FirstCell().InsertData(data); | |
Console.WriteLine("Insert: Elapsed {0} ms", ss.ElapsedMilliseconds); | |
ss.Restart(); | |
wb.SaveAs(@"c:\Temp\Issues\1969\test.xlsx"); | |
Console.WriteLine("Save: Elapsed {0} ms", ss.ElapsedMilliseconds); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment