// Define the text to repeat.
fpSpread1.ActiveSheet.Cells[0, 0].Text = "A1-text";
fpSpread1.ActiveSheet.Cells[0, 1].Text = "A2-text";
fpSpread1.ActiveSheet.Cells[1, 0].Text = "B1-text";
fpSpread1.ActiveSheet.Cells[1, 1].Text = "B2-text";
fpSpread1.ActiveSheet.Cells[0, 0].BackColor = Color.Cyan;
fpSpread1.ActiveSheet.Cells[0, 0].ForeColor = Color.DarkBlue;
fpSpread1.ActiveSheet.Cells[0, 1].BackColor = Color.Coral;
fpSpread1.ActiveSheet.Cells[0, 1].ForeColor = Color.DarkRed;
// Fill three more columns to the right with the two columns' contents.
fpSpread1.ActiveSheet.FillRange(0, 1, 2, 1, 3, FillDirection.Right);
// Fill four more rows down with the contents of the square
// of two rows and two columns.
fpSpread1.ActiveSheet.FillRange(0, 0, 2, 2, 4, FillDirection.Down);
' Define the text to repeat.
fpSpread1.ActiveSheet.Cells(0, 0).Text = "A1-text"
fpSpread1.ActiveSheet.Cells(0, 1).Text = "A2-text"
fpSpread1.ActiveSheet.Cells(1, 0).Text = "B1-text"
fpSpread1.ActiveSheet.Cells(1, 1).Text = "B2-text"
fpSpread1.ActiveSheet.Cells(0, 0).BackColor = Color.Cyan
fpSpread1.ActiveSheet.Cells(0, 0).ForeColor = Color.DarkBlue
fpSpread1.ActiveSheet.Cells(0, 1).BackColor = Color.Coral
fpSpread1.ActiveSheet.Cells(0, 1).ForeColor = Color.DarkRed
' Fill three more columns to the right with the two columns' contents.
fpSpread1.ActiveSheet.FillRange(0, 1, 2, 1, 3, FillDirection.Right)
' Fill four more rows down with the contents of the square
' of two rows and two columns.
fpSpread1.ActiveSheet.FillRange(0, 0, 2, 2, 4, FillDirection.Down)