Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 1.51 KB

Excel.QueryTable.SourceDataFile.md

File metadata and controls

39 lines (22 loc) · 1.51 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
QueryTable.SourceDataFile property (Excel)
vbaxl10.chm518132
vbaxl10.chm518132
Excel.QueryTable.SourceDataFile
c6fb30b8-c909-7509-65bc-f6df9a3640c6
05/03/2019
medium

QueryTable.SourceDataFile property (Excel)

Returns or sets a String value that indicates the source data file for a query table.

Syntax

expression.SourceDataFile

expression A variable that represents a QueryTable object.

Remarks

For file-based data sources (such as Access), the SourceDataFile property contains a fully qualified path to the source data file. It's set to Null for server-based data sources (such as SQL Server). The SourceDataFile property is set to Null if the Connection property is changed programmatically.

If you import data by using the user interface, data from a web query or a text query is imported as a QueryTable object, while all other external data is imported as a ListObject object.

If you import data by using the object model, data from a web query or a text query must be imported as a QueryTable, while all other external data can be imported as either a ListObject or a QueryTable.

Use the QueryTable property of the ListObject to access the SourceDataFile property.

[!includeSupport and feedback]