I want to be able to sort a 2D array on two columns. I have managed to do it on one column using the code extensions from CodeProject
using System.IO;
using OfficeOpenXml;
namespace TestEPPlus
{
class Program
{
static void Main(string[] args)
{
ExcelPackage package = new ExcelPackage(new FileInfo(@"C:\IAIN\Test.xlsx"));
ExcelWorksheet workSheet = package.Workbook.Worksheets["Sheet1"];
object[,] myArray = workSheet.Cells.Value as object[,];
// Sorts the Array by Column 1
var myResult = myArray.OrderBy(x => x[1]);
}
}
}
The Orderedby line in this example sorts on Column 1. I would like to sort on Column 1 and Column 4.
I am committed to using EPPlus to read a very large spreadsheet and it does not support sorting unfortunately.
Thanks All,