Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example retrieves the text of the specified cell.

C++

char array[10][10][80];
char far *ptr;
CX = m_Spread.GetSelBlockCol( );
CY = m_Spread.GetSelBlockRow( );
CXZ = m_Spread.GetSelBlockCol2( );
CYZ = m_Spread.GetSelBlockRow2( );
Dify = CYZ - CY;
Difx = CXZ - CX;
for(y = 0; y <= Dify; y++)
    for(x = 0; x <= Difx; x++)
        {
        ptr = m_Spread.GetText(CX + x, CY + y);
        lstrcpy(array[y][x], ptr);
        }

Visual Basic

CX = fpSpread1.SelBlockCol
CY = fpSpread1.SelBlockRow
Difx = fpSpread1.SelBlockCol2 - fpSpread1.SelBlockCol
Dify = fpSpread1.SelBlockRow2 - fpSpread1.SelBlockRow
For y = 0 To Dify
For x = 0 To Difx
ret = fpSpread1.GetText(CX + x, CY + y, Array(y, x))
Next x
Next y

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