'C# OpenXML Sort Excel on Multiple Columns

I am looking for example code on how to sort an Excel sheet, using OpenXML, on multiple columns in C# .Net 6.

I have a handle on my spreadsheet:

using SpreadsheetDocument spreadSheet = SpreadsheetDocument.Open(path, true);

I need to sort columns by:

  • "Project" a to z
  • Then By "Employee" a to z
  • Then By "Item" a to z
  • Then By "Start" oldest to newest (Date)

I have found very little documentation on how to do this.

Excel Version

Microsoft® Excel® for Microsoft 365 MSO (16.0.14326.20908)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source