_QueryTable.TablesOnlyFromHTML 属性

定义

依据输入值和工作表上定义的公式创建模拟运算表。

public:
 property bool TablesOnlyFromHTML { bool get(); void set(bool value); };
public bool TablesOnlyFromHTML { get; set; }
Public Property TablesOnlyFromHTML As Boolean

属性值

Variant

示例

本示例在工作表 Sheet1 的 A1:K11 单元格中创建一个带格式的乘法运算表。

<span class="label">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.</span>
<i>Table</i>
<span class="label">rowInputCell, columnInputCell With Worksheets("Sheet1").Range("A1").CurrentRegion     .Rows(1).Font.Bold = True     .Columns(1).Font.Bold = True     .Columns.AutoFit End With</span>

本示例在工作表 Sheet1 的 A1:K11 单元格中创建一个带格式的乘法运算表。

<span class="label">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.</span>
<i>Table</i>
<span class="label">rowInputCell, columnInputCell With Worksheets("Sheet1").Range("A1").CurrentRegion     .Rows(1).Font.Bold = True     .Columns(1).Font.Bold = True     .Columns.AutoFit End With</span>

本示例在工作表 Sheet1 的 A1:K11 单元格中创建一个带格式的乘法运算表。

<span class="label">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.</span>
<i>Table</i>
<span class="label">rowInputCell, columnInputCell With Worksheets("Sheet1").Range("A1").CurrentRegion     .Rows(1).Font.Bold = True     .Columns(1).Font.Bold = True     .Columns.AutoFit End With</span>

注解

使用模拟运算表,通过更改工作表上特定常量的值,并观察其他单元格相应的变化情况,可进行模拟分析。

适用于