Spread for ASP.NET 7.0 Product Documentation
LoadTextFile(Stream,Boolean) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class > LoadTextFile Method : LoadTextFile(Stream,Boolean) Method


stream
Stream from which to load the sheet
unformatted
Whether to load the data unformatted

Glossary Item Box

Loads a stream that contains delimited data into the sheet.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub LoadTextFile( _
   ByVal stream As Stream, _
   ByVal unformatted As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim stream As Stream
Dim unformatted As Boolean
 
instance.LoadTextFile(stream, unformatted)
C# 
public void LoadTextFile( 
   Stream stream,
   bool unformatted
)

Parameters

stream
Stream from which to load the sheet
unformatted
Whether to load the data unformatted

Remarks

Set the unformatted parameter to true to bypass the IFormatter in the StyleInfo for the cell and load the data as unformatted data or false to load it as formatted.

Example

This example loads a string containing delimited text into the sheet.
C#Copy Code
FarPoint.Web.Spread.SheetView sv;
System.IO.Stream s;
string fileName;
fileName = "D:\\nums.txt";
sv = FpSpread1.ActiveSheetView;
s = System.IO.File.Open(fileName, IO.FileMode.Open);
sv.LoadTextFile(s, true);
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
Dim s As System.IO.Stream
Dim fileName As String
fileName = "D:\nums.txt"
sv = FpSpread1.ActiveSheetView
s = System.IO.File.Open(fileName, IO.FileMode.Open)
sv.LoadTextFile(s, True)

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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