六个参数,起始行,列,行数,列数,是否按行排序,排序类型
- FarPoint.Win.Spread.SortInfo[] sort = new FarPoint.Win.Spread.SortInfo[1];
- sort[0] = new FarPoint.Win.Spread.SortInfo(0, true, System.Collections.Comparer.Default);
- fpSpread1.ActiveSheet.SetValue(0, 0, "C");
- fpSpread1.ActiveSheet.SetValue(1, 0, "A");
- fpSpread1.ActiveSheet.SetValue(2, 0, "E");
- fpSpread1.ActiveSheet.SetValue(3, 0, "B");
- fpSpread1.ActiveSheet.SetValue(0, 1, "3");
- fpSpread1.ActiveSheet.SetValue(1, 1, "5");
- fpSpread1.ActiveSheet.SetValue(2, 1, "1");
- fpSpread1.ActiveSheet.SetValue(3, 1, "2");
- fpSpread1.ActiveSheet.SortRange(0, 0, 4, 2, true, sort);
复制代码 |