Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example starts the column headers at a specified number, provides text for the row headers, and sets the row height and the maximum number of rows.

C++

// Set column headers to display numbers
m_Spread1.SetColHeadersAutoText(DispNumbers);

// Set the starting column number
m_Spread1.SetStartingColNumber(1990);

// Set the maximum number of rows
m_Spread1.SetMaxRows(4);

// Provide text for the row header
// Specify clipping block
m_Spread1.SetCol(0);
m_Spread1.SetCol2(0);
m_Spread1.SetRow(1);
m_Spread1.SetRow2(4);
// Clip data into the sheet
m_Spread1.SetClip("Sales Revenue\nCost of Goods\nOperating Expenses\nNet Income");

// Align the text to the right in the row headers
m_Spread1.SetCol(0);
m_Spread1.SetRow(-1);
m_Spread1.SetTypeHAlign(TypeHAlignRight);


// Set the height of all the rows
m_Spread1.SetRowHeight(-1,14);

// Set the width of the row header
m_Spread1.SetColWidth(0,15);

Visual Basic

' Set column headers to display numbers
fpSpread1.ColHeadersAutoText = DispNumbers

' Set the starting column number
fpSpread1.StartingColNumber = 1990

' Set the maximum number of rows
fpSpread1.MaxRows = 4

' Provide text for the row header
' Specify clipping block
fpSpread1.Col = 0
fpSpread1.Col2 = 0
fpSpread1.Row = 1
fpSpread1.Row2 = 4
' Clip data into the sheet
fpSpread1.Clip = "Sales Revenue" + Chr$(13) + "Cost of Goods" + Chr$(13) + "Operating Expenses" + Chr$(13) + "Net Income"

' Align the text to the right in the row headers
fpSpread1.Col = 0
fpSpread1.Row = -1
fpSpread1.TypeHAlign = TypeHAlignRight

' Set the height of all the rows
fpSpread1.RowHeight(-1) = 14

' Set the width of the row header
fpSpread1.ColWidth(0) = 15

Copyright © GrapeCity, inc. All rights reserved.