Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.96 KB

Excel.QueryTable.WebSingleBlockTextImport.md

File metadata and controls

55 lines (34 loc) · 1.96 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
QueryTable.WebSingleBlockTextImport property (Excel)
vbaxl10.chm518126
vbaxl10.chm518126
Excel.QueryTable.WebSingleBlockTextImport
044de013-a065-86a3-b910-d4dec0a761b8
05/03/2019
medium

QueryTable.WebSingleBlockTextImport property (Excel)

True if data from the HTML <PRE> tags on the specified webpage is processed all at once when you import the page into a query table. False if the data is imported in blocks of contiguous rows so that header rows will be recognized as such. The default value is False. Read/write Boolean.

Syntax

expression.WebSingleBlockTextImport

expression A variable that represents a QueryTable object.

Remarks

Use this property only when the query table's QueryType property is set to xlWebQuery, and the query returns an HTML document.

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.

The WebSingleBlockTextImport property applies only to QueryTable objects.

Example

This example adds a new web query table to the first worksheet in the first workbook, and then imports all the HTML <PRE> tag data all at once.

Set shFirstQtr = Workbooks(1).Worksheets(1) 
Set qtQtrResults = shFirstQtr.QueryTables _ 
 .Add(Connection := "URL;https://datasvr/98q1/19980331.htm", _ 
 Destination := shFirstQtr.Cells(1,1)) 
With qtQtrResults 
 .WebSingleBlockTextImport = True 
 .Refresh 
End With

[!includeSupport and feedback]