Spread Windows Forms 6.0 Product Documentation
LoadTextFile(SheetView,String,IncludeHeaders,String,String,String,TextFileFlags) Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > SpreadSerializer Class > LoadTextFile Method : LoadTextFile(SheetView,String,IncludeHeaders,String,String,String,TextFileFlags) Method


sheetView
Sheet into which to load the text data
fileName
Path and name of file from which to load text
includeHeaders
Whether headers are handled as data
rowDelimiter
Row delimiter string
columnDelimiter
Column delimiter string
cellDelimiter
Cell delimiter string
flags
Specifies how to process the data when loading from a text file

Glossary Item Box

Loads the text file with the specified formatting.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub LoadTextFile( _
   ByVal sheetView As SheetView, _
   ByVal fileName As String, _
   ByVal includeHeaders As IncludeHeaders, _
   ByVal rowDelimiter As String, _
   ByVal columnDelimiter As String, _
   ByVal cellDelimiter As String, _
   ByVal flags As TextFileFlags _
) 
Visual Basic (Usage)Copy Code
Dim sheetView As SheetView
Dim fileName As String
Dim includeHeaders As IncludeHeaders
Dim rowDelimiter As String
Dim columnDelimiter As String
Dim cellDelimiter As String
Dim flags As TextFileFlags
 
SpreadSerializer.LoadTextFile(sheetView, fileName, includeHeaders, rowDelimiter, columnDelimiter, cellDelimiter, flags)
C# 
public static void LoadTextFile( 
   SheetView sheetView,
   string fileName,
   IncludeHeaders includeHeaders,
   string rowDelimiter,
   string columnDelimiter,
   string cellDelimiter,
   TextFileFlags flags
)

Parameters

sheetView
Sheet into which to load the text data
fileName
Path and name of file from which to load text
includeHeaders
Whether headers are handled as data
rowDelimiter
Row delimiter string
columnDelimiter
Column delimiter string
cellDelimiter
Cell delimiter string
flags
Specifies how to process the data when loading from a text file

Example

This example uses the LoadTextFile method.
C#Copy Code
FarPoint.Win.Spread.Model.SpreadSerializer.LoadTextFile(fpSpread1.ActiveSheet, "D:\\SpreadFiles\\tabbed.txt", FarPoint.Win.Spread.Model.IncludeHeaders.None, "\t", ",", "", FarPoint.Win.Spread.TextFileFlags.None);
Visual BasicCopy Code
Dim s As New FarPoint.Win.Spread.Model.SpreadSerializer
s.LoadTextFile(FpSpread1.ActiveSheet, "D:\SpreadFiles\tabbed.txt", FarPoint.Win.Spread.Model.IncludeHeaders.None, Chr(13), ",", "", FarPoint.Win.Spread.TextFileFlags.None)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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