作成日: 2019/07/03 最終更新日: 2019/07/03
文書種別
使用方法
詳細
現在表示されているシート左上のセルの行(列)インデックスを取得するにはFpSpreadクラスのGetViewportTopRowメソッド(GetViewportLeftColumnメソッド)を使用します。また、現在表示されているシート右下のセルの行(列)インデックスを取得するにはFpSpreadクラスのGetViewportBottomRowメソッド(GetViewportRightColumnメソッド)を使用します。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TopRow As Integer
Dim LeftCol As Integer
Dim BottomRow As Integer
Dim RightColumn As Integer
TopRow = FpSpread1.GetViewportTopRow(0)
LeftCol = FpSpread1.GetViewportLeftColumn(0)
BottomRow = FpSpread1.GetViewportBottomRow(0)
RightColumn = FpSpread1.GetViewportRightColumn(0)
Console.WriteLine("TopRow:" + TopRow.ToString() + ",LeftColumn:" + LeftCol.ToString())
Console.WriteLine("BottomRow:" + BottomRow.ToString() + ",RightColumn:" + RightColumn.ToString())
End Sub
Dim TopRow As Integer
Dim LeftCol As Integer
Dim BottomRow As Integer
Dim RightColumn As Integer
TopRow = FpSpread1.GetViewportTopRow(0)
LeftCol = FpSpread1.GetViewportLeftColumn(0)
BottomRow = FpSpread1.GetViewportBottomRow(0)
RightColumn = FpSpread1.GetViewportRightColumn(0)
Console.WriteLine("TopRow:" + TopRow.ToString() + ",LeftColumn:" + LeftCol.ToString())
Console.WriteLine("BottomRow:" + BottomRow.ToString() + ",RightColumn:" + RightColumn.ToString())
End Sub
◎サンプルコード(C#)
private void button1_Click(object sender, EventArgs e)
{
int TopRow;
int LeftCol;
int BottomRow;
int RightColumn;
TopRow = fpSpread1.GetViewportTopRow(0);
LeftCol = fpSpread1.GetViewportLeftColumn(0);
BottomRow = fpSpread1.GetViewportBottomRow(0);
RightColumn = fpSpread1.GetViewportRightColumn(0);
Console.WriteLine("TopRow:" + TopRow.ToString() + ",LeftColumn:" + LeftCol.ToString());
Console.WriteLine("BottomRow:" + BottomRow.ToString() + ",RightColumn:" + RightColumn.ToString());
}
{
int TopRow;
int LeftCol;
int BottomRow;
int RightColumn;
TopRow = fpSpread1.GetViewportTopRow(0);
LeftCol = fpSpread1.GetViewportLeftColumn(0);
BottomRow = fpSpread1.GetViewportBottomRow(0);
RightColumn = fpSpread1.GetViewportRightColumn(0);
Console.WriteLine("TopRow:" + TopRow.ToString() + ",LeftColumn:" + LeftCol.ToString());
Console.WriteLine("BottomRow:" + BottomRow.ToString() + ",RightColumn:" + RightColumn.ToString());
}
旧文書番号
84197