Skip to content

Instantly share code, notes, and snippets.

@jahav
jahav / Create-1_000_000.cs
Created September 28, 2023 13:14
Create a file with 1 000 000 rows and 10 columns and print out how long it takes.
var sw = Stopwatch.StartNew();
using var wb = new XLWorkbook();
var sheet = wb.AddWorksheet();
// Lazy created data
var data = Enumerable.Range(0, 1_000_000).Select(_ =>
{
return Enumerable.Range(0, 10).Select(_ => "Hello world");
});