Yes, only you know what to expect when reading a text file ... what are the delimiters, how many columns, what type of values are in each column, so it is quite a lot to expect software to parse a plain text file and get it right. Excel tries and gets it wrong a significant number of times. Too often eliminating leading zeros for example.
However, I will say that if you parse each row into a well-constructed object. You can pass a list of those objects to the InsertTable method and you have the whole Excel sheet created with one method call. Headings and all.
Such simplicity can't be beat.
example:
sheet.Cell(1, 1).InsertTable(listOfRowObjects)
See this discussion:
https://closedxml.codeplex.com/discussions/251095
However, I will say that if you parse each row into a well-constructed object. You can pass a list of those objects to the InsertTable method and you have the whole Excel sheet created with one method call. Headings and all.
Such simplicity can't be beat.
example:
sheet.Cell(1, 1).InsertTable(listOfRowObjects)
See this discussion:
https://closedxml.codeplex.com/discussions/251095