LoadText Method

Microsoft Office Web Components Visual Basic

expression.LoadText(File, Delimiters, ConsecutiveDelimAsOne, TextQualifier)

expression    An expression that returns a Range object.

File    Required String. Specifies the name of the text file.

Delimiters    Optional String. Specifies the field delimiters. The default value is no delimiter.

ConsecutiveDelimAsOne    Optional Boolean. True to have consecutive delimiters considered as a single delimiter. The default value is False.

TextQualifier    Optional String. Specifies the text qualifier. The default value is the double quotation mark character.

Example

This example inserts a tab-delimited text file into the active worksheet of Spreadsheet1. The contents of the text file will begin in cell B10.

Spreadsheet1.ActiveSheet.Range("B10").LoadText "tabfile.txt", Chr$(9)