Friday, July 04, 2008  



 FarPoint Technologies
 (800) 645-5913

 fpsales@fpoint.com



     
 »Spread »Product Tour » Adding Data

Previous Adding Data Next

Spread provides many options for adding data to the component.

Add Formatted Data | Add Unformatted Data | Load a Spread File | Load a Text File | Load an Excel-Formatted File

  Back to Top
 Add Formatted Data
   Formatted data usually includes information that denotes the context of the data. For example, formatted monetary data might include currency and separator characters to indicate monetary value, as in $1,025.34.

You can use any of the following methods to add data:
Clip: Use to set a block of data, where tab characters separate columns and carriage return and linefeed characters separate rows
Text: Use to set data for cell
SetText: Similiar to the Text property, but a much faster method
SetArray: Use to set data from an array

The following example adds text to cell A2.

fpSpread1.SetText 1,2,"Hello World"

  Back to Top
 Add Unformatted Data
   Unformatted data does not include additional information and might require a specific format to convey meaning. For example, unformatted monetary data would not include the currency and separator characters, only the numeric value, as in 1025.34.

You can use any of the following methods to add data:
ClipValue: Use to set a block of data, where tab characters separate columns and carriage return and linefeed characters separate rows
Value: Use to set data for cell
SetFloat, SetInteger: Use to set data for a numeric cell

The following example adds the value 1223.12 to cell A2.

fpSpread1.SetFloat 1, 2, 1223.12

 Back to Top
 Load a Spread File
   The fpSpread control can load data from a .SS6 file, Spread's proprietary file format. These proprietary files can contain all spreadsheet data and formatting or just spreadsheet data.

The following example loads a Spread file.

ret = fpSpread1.LoadFromFile("C:\DATA.SS3")

  Back to Top
 Load a Text File
   Spread can load any delimited text file, including tab and comma delimited files with one simple call.

The following example loads a tab delimited file.

ret = fpSpread1.LoadTabFile("C:\DATA.TB3")

  Back to Top
 Load an Excel-Formatted File
   Spread can load worksheets created as Excel 97, Excel 2000, and Excel 2002 spreadsheets (BIFF8 format).

The following example loads an Excel Sheet.

ret = fpSpread1.ImportExcelSheet(fphandle, 1)


Previous Adding Data Next

    
 Have a question?
Have a Question? Ask Us!
Subscribe to the RSS feed!RSS Subscribe
 

 
SD Times 'TOP 100' Industry Innovator - Read the press release (pdf)


Developer Tour
Adding Data
Saving Data
Working with Data
Working with Spreadsheets
Printing Spreadsheets
Customizing Columns and Rows
Working with Cells
Working with Cell Types
Binding to Databases
Customizing the Spreadsheet Display
Customizing User Interaction
Spread Designer Overview
50 Spread Events
Rate Tour

Copyright © 1991-2007 FarPoint Technologies, Inc. All rights reserved. All names are property of their respective owners.