Saturday, October 11, 2008  



 FarPoint Technologies
 (800) 645-5913

 fpsales@fpoint.com



     
 »Spread for Windows Forms » Product Tour » Import Export » Saving Data

Previous Saving Data to a File Next

  Back to Top
 Saving to a Spread XML File
You can save the data or the data and formatting in an FpSpread control to a Spread XML file or to a stream. When you save, all sheets in the control are saved to the file or stream. If you choose to save the formatting, the data saved includes formatting characters, such as currency symbols, and other information such as cell types are also saved.

' Save the data and formatting to an XML file
FpSpread1.Save("c:\SpWinFile1.xml", False)


  Back to Top
 Saving to an Excel File
You can save Spread to an Excel-formatted file or stream (BIFF8 format). When you save to Excel the data (including formulas) and formatting for each element in Spread are written out to a file or stream. In addition, Spread saves off each workbook level feature of Spread that has a corresponding feature in Excel. There are many different SaveExcel methods. Some of the methods have a saveFlags option. This allows you to specify headers and other options.

' Save the data to an Excel-formatted file, including headers
FpSpread1.SaveExcel("c:\excelfile.xls", FarPoint.Win.Spread.Model.IncludeHeaders.Both)


  Back to Top
 Saving to a Text File
You can save the data or the data and formatting in a sheet to a text file, using either default tab delimiters or custom delimiters. In addition, you can specify whether headers are saved with the data. Delimited files contain data separated by user-defined delimiters, such as commas, quotation marks, or other delimiters. You can save the entire spreadsheet or a portion of the spreadsheet data from the control to tab-delimited and delimited files.

Optional Parameters
fileName Path and name of file to which to save the text of the sheet
unformatted True to bypass the IFormatter in the StyleInfo for the cell so data is unformatted; false otherwise
includeHeaders Whether to export headers as data
rowDelimiter Row delimiter string
columnDelimiter Column delimiter string
cellDelimiter Cell delimiter string

' Save unformatted data to a text file
FpSpread1.Sheets(0).SaveTextFile("c:\filerange.txt", True)


Previous Saving Data to a File Next


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

 
Learn about the new Roadshow now!

Tour Home
Overview
Appearance
User Interaction
Cell Types
Formulas
Managing Data
Data Binding
Import/Export
Printing
Keyboard Interaction
Shapes
Models
Spread Designer
 
Map

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