我这边用以下网址下载的日文版Spread V2.5 创建一个最简单的vb Form应用,在画面onload方法设置
RowCount 和 ColumnCount 为 0,在一个button事件中弹出3信息,分别显示当前Spread表格的ActiveRowIndex ,RowCount和ColumnCount ,结果显示依次为:-1,0,0,测试方法正确吗?
代码如下:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.FpSpread1_Sheet1.RowCount = 0
Me.FpSpread1_Sheet1.ColumnCount = 0
'MessageBox.Show(Me.FpSpread1_Sheet1.ActiveRowIndex)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show(Me.FpSpread1_Sheet1.ActiveRowIndex)
MessageBox.Show(Me.FpSpread1_Sheet1.RowCount)
MessageBox.Show(Me.FpSpread1_Sheet1.ColumnCount)
'Me.FpSpread1_Sheet1.Cells(0, 10).Invalidate()
End Sub
End Class |