回复 1楼leikaihua的帖子
1# 问题,只是对 Spread 底层数据模型进行排序,无法使格式随机调整。
可以尝试把行高放置在排序单元格的 tag 中,在排序完成后取 tag值重新设置,Tag使用参考代码:
- Private Sub Command1_Click()
- fpSpread1.SortKey(1) = 1
-
- fpSpread1.SortKeyOrder(1) = SortKeyOrderDescending
- fpSpread1.Sort -1, -1, -1, -1, SortByRow
-
- fpSpread1.Col = 1
- fpSpread1.Row = 2
- Dim a As String
- a = fpSpread1.CellTag
-
-
-
- End Sub
- Private Sub Form_Load()
- fpSpread1.Col = 1
- fpSpread1.Row = 1
- fpSpread1.Value = 1
- fpSpread1.CellTag = "1"
- fpSpread1.TextTip = TextTipFixed
- fpSpread1.Row = 2
- fpSpread1.Value = 2
- End Sub
复制代码 |