Search Results for

    Show / Hide Table of Contents

    ExcelFile.Import Method

    Overloads

    • ExcelFile.Import(TextReader, Int32, Int32, Int32[], ColumnImportType[])
    • ExcelFile.Import(TextReader, Int32, Int32, Int32[], ColumnImportType[], String[])
    • ExcelFile.Import(String, Int32, Int32, Char, ColumnImportType[], Encoding, Boolean)
    • ExcelFile.Import(Stream, Int32, Int32, Char, ColumnImportType[], Encoding, Boolean)
    • ExcelFile.Import(TextReader, Int32, Int32, Char, Char, ColumnImportType[], String[])
    • ExcelFile.Import(String, Int32, Int32, Int32[], ColumnImportType[], Encoding, Boolean)
    • ExcelFile.Import(Stream, Int32, Int32, Int32[], ColumnImportType[], Encoding, Boolean)
    • ExcelFile.Import(String, Int32, Int32, Char, ColumnImportType[], String[], Encoding, Boolean)
    • ExcelFile.Import(Stream, Int32, Int32, Char, ColumnImportType[], String[], Encoding, Boolean)
    • ExcelFile.Import(String, Int32, Int32, Int32[], ColumnImportType[], String[], Encoding, Boolean)
    • ExcelFile.Import(Stream, Int32, Int32, Int32[], ColumnImportType[], String[], Encoding, Boolean)
    • ExcelFile.Import(String, Int32, Int32, Char, Char, ColumnImportType[], String[], Encoding, Boolean)
    • ExcelFile.Import(Stream, Int32, Int32, Char, Char, ColumnImportType[], String[], Encoding, Boolean)

    ExcelFile.Import(TextReader, Int32, Int32, Int32[], ColumnImportType[])

    Imports a text file (fixed length columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(TextReader aTextReader, Int32 firstRow, Int32 firstCol, Int32[] columnWidths, ColumnImportType[] columnFormats)

    Parameters

    <-> Parameter Type Description
    aTextReader TextReader StreamReader with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    columnWidths Int32[] An array with the column widths for every column you want to import.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.

    See also

    • ExcelFile

    ExcelFile.Import(TextReader, Int32, Int32, Int32[], ColumnImportType[], String[])

    Imports a text file (fixed length columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public abstract void Import(TextReader aTextReader, Int32 firstRow, Int32 firstCol, Int32[] columnWidths, ColumnImportType[] columnFormats, String[] dateFormats)

    Parameters

    <-> Parameter Type Description
    aTextReader TextReader StreamReader with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    columnWidths Int32[] An array with the column widths for every column you want to import.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.

    See also

    • ExcelFile

    ExcelFile.Import(String, Int32, Int32, Char, ColumnImportType[], Encoding, Boolean)

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(String fileName, Int32 firstRow, Int32 firstCol, Char delimiter, ColumnImportType[] columnFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    fileName String File with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(Stream, Int32, Int32, Char, ColumnImportType[], Encoding, Boolean)

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(Stream aStream, Int32 firstRow, Int32 firstCol, Char delimiter, ColumnImportType[] columnFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    aStream Stream Stream with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(TextReader, Int32, Int32, Char, Char, ColumnImportType[], String[])

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public abstract void Import(TextReader aTextReader, Int32 firstRow, Int32 firstCol, Char delimiter, Char textQualifier, ColumnImportType[] columnFormats, String[] dateFormats)

    Parameters

    <-> Parameter Type Description
    aTextReader TextReader TextReader with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    textQualifier Char Character used to quote strings when they contain the delimiter. This is normally the double quote (") but you might change it by a single quote or any other character. Use a char 0 if the original file isn't quoted.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.

    See also

    • ExcelFile

    ExcelFile.Import(String, Int32, Int32, Int32[], ColumnImportType[], Encoding, Boolean)

    Imports a text file (fixed length columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(String fileName, Int32 firstRow, Int32 firstCol, Int32[] columnWidths, ColumnImportType[] columnFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    fileName String File with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    columnWidths Int32[] An array with the column widths for every column you want to import.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(Stream, Int32, Int32, Int32[], ColumnImportType[], Encoding, Boolean)

    Imports a text file (fixed length columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(Stream aStream, Int32 firstRow, Int32 firstCol, Int32[] columnWidths, ColumnImportType[] columnFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    aStream Stream Stream with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    columnWidths Int32[] An array with the column widths for every column you want to import.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(String, Int32, Int32, Char, ColumnImportType[], String[], Encoding, Boolean)

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(String fileName, Int32 firstRow, Int32 firstCol, Char delimiter, ColumnImportType[] columnFormats, String[] dateFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    fileName String File with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(Stream, Int32, Int32, Char, ColumnImportType[], String[], Encoding, Boolean)

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(Stream aStream, Int32 firstRow, Int32 firstCol, Char delimiter, ColumnImportType[] columnFormats, String[] dateFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    aStream Stream Stream with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(String, Int32, Int32, Int32[], ColumnImportType[], String[], Encoding, Boolean)

    Imports a text file (fixed length columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(String fileName, Int32 firstRow, Int32 firstCol, Int32[] columnWidths, ColumnImportType[] columnFormats, String[] dateFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    fileName String File with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    columnWidths Int32[] An array with the column widths for every column you want to import.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(Stream, Int32, Int32, Int32[], ColumnImportType[], String[], Encoding, Boolean)

    Imports a text file (fixed length columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(Stream aStream, Int32 firstRow, Int32 firstCol, Int32[] columnWidths, ColumnImportType[] columnFormats, String[] dateFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    aStream Stream Stream with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    columnWidths Int32[] An array with the column widths for every column you want to import.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(String, Int32, Int32, Char, Char, ColumnImportType[], String[], Encoding, Boolean)

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(String fileName, Int32 firstRow, Int32 firstCol, Char delimiter, Char textQualifier, ColumnImportType[] columnFormats, String[] dateFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    fileName String File with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    textQualifier Char Character used to quote strings when they contain the delimiter. This is normally the double quote (") but you might change it by a single quote or any other character. Use a char 0 if the original file isn't quoted.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile

    ExcelFile.Import(Stream, Int32, Int32, Char, Char, ColumnImportType[], String[], Encoding, Boolean)

    Imports a text file (character-delimited columns) into the current sheet. Note that this method won't clear any existing data.

    Syntax

    Namespace: FlexCel.Core

    public void Import(Stream aStream, Int32 firstRow, Int32 firstCol, Char delimiter, Char textQualifier, ColumnImportType[] columnFormats, String[] dateFormats, Encoding fileEncoding, Boolean detectEncodingFromByteOrderMarks)

    Parameters

    <-> Parameter Type Description
    aStream Stream Stream with the text to import.
    firstRow Int32 Row in the Active sheet where we will start importing the text file.
    firstCol Int32 Column in the Active sheet where we will start importing the text file.
    delimiter Char Character used to separate columns.
    textQualifier Char Character used to quote strings when they contain the delimiter. This is normally the double quote (") but you might change it by a single quote or any other character. Use a char 0 if the original file isn't quoted.
    columnFormats ColumnImportType[] An array of ColumnImportType elements, telling how each column should be imported.
    See the example in Open(Stream, TFileFormats, Char, Int32, Int32, ColumnImportType[]) for more information on how to use it.
    dateFormats String[] A list of formats allowed for dates and times, when opening text files. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values. This value has no meaning in normal xls files, only text files.
    fileEncoding Encoding Encoding used by the file we are reading. If omitted or null, it is assumed to be Encoding.UTF8.
    detectEncodingFromByteOrderMarks Boolean It is the same on the constructor of a StreamReader, and it says if BOM must be used at the beginning of the file. It defaults to true.

    See also

    • ExcelFile
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com