FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
TFlexCelImport.LoadFromTextStream Method (TStream, UTF16Char, array of XLSColumnImportTypes)

This method is similar to OpenText, but it reads the data from a stream instead of a file.

Pascal
procedure LoadFromTextStream(const DataStream: TStream; const Delimiter: UTF16Char; const ColumnFormats: array of XLSColumnImportTypes); overload;
C++
__fastcall LoadFromTextStream(const TStream DataStream, const UTF16Char Delimiter, const array of XLSColumnImportTypes ColumnFormats);
Parameters 
Description 
const DataStream: TStream 
Stream with the Excel file. Make sure it is at the correct position (normally 0), since FlexCel will try to read the file from the current position. 
const Delimiter: UTF16Char 
The character used to separate fields. 
const ColumnFormats: array of XLSColumnImportTypes 
An array of formats that you can supply so FlexCel knows which kind of data a column contains. For each column in the ColumnFormats array, you can specify:

  • xct_General: Try to convert it to a number, a date, etc.
  • xct_Text : Keep the column as text, even if it can be converted to a number or other things.
  • xct_Skip: Do not import this column. 
Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!