_QueryTable.TablesOnlyFromHTML Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a data table based on input values and formulas that you define on a worksheet.
public:
property bool TablesOnlyFromHTML { bool get(); void set(bool value); };
public bool TablesOnlyFromHTML { get; set; }
Public Property TablesOnlyFromHTML As Boolean
Property Value
Variant
Examples
This example creates a formatted multiplication table in cells A1:K11 on Sheet1.
<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>
This example creates a formatted multiplication table in cells A1:K11 on Sheet1.
<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>
This example creates a formatted multiplication table in cells A1:K11 on Sheet1.
<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>
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.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應