Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example converts a column letter to the corresponding column number.

C++

long s;
char buffer[20];

// Set number of sheets
m_Spread.SetSheetCount(2);
// Set specific sheet number
m_Spread.SetSheet(1);
// Use ColLetterToNumber method
s = m_Spread.ColLetterToNumber("D");
// Show result in message box, convert long
_ltoa( s, buffer, 16 );
::MessageBox (NULL, buffer, "message body", MB_OK);

Visual Basic

' Set number of sheets
fpSpread1.SheetCount = 2
' Set specific sheet number
fpSpread1.Sheet = 1
Dim i As Long
' Get column number
i = fpSpread1.ColLetterToNumber("C")
' Show result in immediate window
Debug.Print i

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.