回复 4楼ywm的帖子
请问4# 问题指的是“选定一个范围的单元格”吗?
获取 CellRange 行列的最大值及最小值,测试代码如下:
- DialogResult dlg;
- fpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.MultiRange;
- fpSpread1.ActiveSheet.AddSelection(0, 0, 2, 2);
- fpSpread1.ActiveSheet.AddSelection(0, 3, 2, 2);
- dlg = MessageBox.Show("Do you want to get one of the selections?", "GetSelection", MessageBoxButtons.YesNo);
- if (dlg == DialogResult.Yes)
- {
- FarPoint.Win.Spread.Model.CellRange cr;
- cr = fpSpread1.ActiveSheet.GetSelection(1);
- label1.Text = "The selection covers cells " + cr.Row + ", " + cr.Column + ", " + cr.RowCount + ", " + cr.ColumnCount;
- }
复制代码 |