Sort a table in ClosedXML while keeping header row
问题 I've tried a few methods of sorting in ClosedXML but they've all had the same results: the first row of data becomes the new header in excel. Here's the code I've used so far: Dim dtChangedScores As New DataTable dtChangedScores.Columns.Add("Name") dtChangedScores.Columns.Add("Old Score") dtChangedScores.Columns.Add("New Score") Dim dr As DataRow = dtChangedScores.NewRow dr("Name") = "aaa" dr("Old Score") = "bbb" dr("New Score") = "bbb" dtChangedScores.Rows.Add(dr) 'etc.... Dim wb = New