Spread 8.0 Documentation
SSClipIn Function
Support Options
DLL Reference > DLL Functions > SSClipIn Function

Glossary Item Box

SSClipIn Function


See Also    ActiveX    Example

Applies To

fpSpread DLL control

Description

Loads formatted data into a column, a row, or a block of cells.

Syntax

C

BOOL SSClipIn(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPCTSTR Buffer, long BufferLen);

C++

BOOL TSpread::ClipIn(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPCTSTR Buffer, long BufferLen);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of the upper-left cell of the block
Row Row number of the upper-left cell of the block
Col2 Column number of the lower-right cell of the block
Row2 Row number of the lower-right cell of the block
Buffer Pointer to the buffer containing the data to be loaded
BufferLen Size (in bytes) of the buffer

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

Remarks

Call this function to fill a block of cells with data instead of filling each cell separately calling the SSSetData function. If you need to load large amounts of data into the sheet, call the SSClipIn function to improve speed.

In tab-delimited data, each data item is separated by a tab character. Each row is separated by a carriage return (<CR>) and linefeed (<LF>).

The following table explains the data format to use when setting data using the Clip property. Values in quotation marks (" ") are string values.

Cell Type Sample Data Set Data
Button True (Two-state) "1"
False (Two-state) "0"
Not set (Two-state; looks False) Empty string
Check Box True "1"
False "0"
Grayed "2"
Not set; looks False Empty string
Combo Box Text string of selected item
Currency "$10,000.00" "10000.00"
Date "10/29/2001" "10/29/2001"
When setting, provide in format that matches the the format specified by the SSSetTypeDate function. Use a separator where separators are displayed in the format.
Edit Text
If the SSSetTypeEdit function's Style parameter is set to ES_MULTILINE, a linefeed character ('\n' in C++) can be used to force a line break when setting text.
Number "10,000.00" "10,000.00" or "1E4"
Owner-Drawn not applicable
Percent "15%" "15"
PIC "22-45-76" "22-45-76" or "22 45 76" where space is used instead of typing the placeholder character
Picture not applicable
Scientific "2.22E+05" "2.22E+05"
Static Text Text string
If the SSSetTypeStaticText function's TextStyle parameter is set to SS_TEXT_WORDWRAP, a linefeed character ('\n' in C++) can be used to force a line break when setting text.
Time "11:25:03 pm" "11:25:03 pm"
When setting and using an a.m./p.m. indicator, include a space between the time value and the indicator, for example, "10:00:00 p.m."

Call the SSClipValueIn function to load unformatted data into the sheet.

Refer to Formatted and Unformatted Data for more information about formatted versus unformatted data.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Adding Data

SSClipOut, SSClipValueIn, SSClipValueOut, SSSetData, SSSetSheet functions

ActiveX Correspondence

Clip property

Copyright © GrapeCity, inc. All rights reserved.