Compartilhar via


_QueryTable.TablesOnlyFromHTML Property

Creates a data table based on input values and formulas that you define on a worksheet.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property TablesOnlyFromHTML As Boolean
    Get
    Set
'Usage
Dim instance As _QueryTable
Dim value As Boolean

value = instance.TablesOnlyFromHTML

instance.TablesOnlyFromHTML = value
bool TablesOnlyFromHTML { get; set; }

Property Value

Type: System.Boolean
Variant

Remarks

Use data tables to perform a what-if analysis by changing certain constant values on your worksheet to see how values in other cells are affected.

Examples

This example creates a formatted multiplication table in cells A1:K11 on Sheet1.

Set dataTableRange = Worksheets("Sheet1").Range("A1:K11") 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Set rowInputCell = Worksheets("Sheet1").Range("A12") 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Set columnInputCell = Worksheets("Sheet1").Range("A13") 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Worksheets("Sheet1").Range("A1").Formula = "=A12*A13" 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































For i = 2 To 11 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































    Worksheets("Sheet1").Cells(i, 1) = i - 1 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































    Worksheets("Sheet1").Cells(1, i) = i - 1 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Next i 































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































dataTableRange.TablerowInputCell, columnInputCell With Worksheets("Sheet1").Range("A1").CurrentRegion     .Rows(1).Font.Bold = True     .Columns(1).Font.Bold = True     .Columns.AutoFit End With

See Also

Reference

_QueryTable Interface

_QueryTable Members

Microsoft.Office.Interop.Excel Namespace