ImportDataFile (Method)

Applies To:

Sections collection, WebClientDocument object

Description:

Imports a data file into a Query section.

Syntax:

Expression.Import(Filename As String, FileType As BqImportDataFileFormat [optional], BqEncoding Encoding)

Expression Required:

An expression that returns a Sections object

Constants:

The BqImportDataFileFormat constant group contains these values:

The BqEncoding group values include:

Example:

This example shows how to import a comma separated data file:

var Filename = "C:\\Imports\\SalesData.csv"
var MySection = ActiveDocument.Sections.ImportDataFile(Filename, bqImportFormatCommaText)