If you are dealing with millions of cells, and you want to insert data as quickly as possible, consuming the minimum amount of memory, then SAX is the way to go.
If you want ClosedXML to do this job, use:
cell.Value = dataTable;
or
cell.SetValue (dataTable);
or
cell.InsertData (dataTable);
or
cell.InsertTable (dataTable);
See the Insert Data / Tables section in Documentation.
source share