FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
LoadFromTextDelim Function

Imports a text file into an Excel file.

Pascal
procedure LoadFromTextDelim(const InStream: TStream; const Workbook: TExcelFile; const aDelim: UTF16Char; const FirstRow: integer; const FirstCol: integer; const ColumnFormats: array of XLSColumnImportTypes); overload;
C++
LoadFromTextDelim(const TStream InStream, const TExcelFile Workbook, const UTF16Char aDelim, const int FirstRow, const int FirstCol, const array of XLSColumnImportTypes ColumnFormats);
Parameters 
Description 
const InStream: TStream 
Stream with the text delimited file you want to import. 
const Workbook: TExcelFile 
Excel file where there data will be imported. 
const aDelim: UTF16Char 
Delimiter used in the file. This is normally ",", ";" in csv files or #9 (tab) in tab delimited files. 
const FirstRow: integer 
First row where the data will be imported. (1 based) 
const FirstCol: integer 
First column where the data will be imported (1 based) 
const ColumnFormats: array of XLSColumnImportTypes 
Array of import types specifying how to import each column. 

Normally you can just use TFlexCelImport.OpenFile Method to import csv files, but this method gives you a little more control, like the row and column where to import the data. 

Actually OpenText internally calls this method.

Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!