Posted 10 June 2023, 8:04 am EST
Hi,
I have to sort my excel data based on a date field. I tried the below code from demo but somehow I am not able to change it for date sorting. Can you please help share an example of using valuesortfield for sorting the excel on date column?
My date column has number format :- d-mmm-yy
Thanks
var sortkey = new ValueSortField(worksheet.Range[“A1:A2”], “1,2,3”);
worksheet.Range[“A2:A6”].Sort(SortOrientation.Columns, false, sortkey);