FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
LoadFromTextDelim Function

Imports a text file into an Excel file.

Pascal
procedure LoadFromTextDelim(const Sr: TStreamReader; const Workbook: TExcelFile; const Delim: UTF16Char; const FirstRow: integer; const FirstCol: integer; const ColumnFormats: array of XLSColumnImportTypes); overload;
C++
LoadFromTextDelim(const TStreamReader Sr, const TExcelFile Workbook, const UTF16Char Delim, const int FirstRow, const int FirstCol, const array of XLSColumnImportTypes ColumnFormats);
Parameters 
Description 
const Sr: TStreamReader 
StreamReader with the text delimited file you want to import. 
const Workbook: TExcelFile 
Excel file where there data will be imported. 
const Delim: 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. 

 

This overload of the method is only available in Delphi 2009 or newer.  

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