📌  相关文章
📜  excel枢轴添加行中的所有字段 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:35.229000             🧑  作者: Mango

代码示例1
Sub AddAllFieldsValues()
'Update 20141112
    Dim pt As PivotTable
    Dim I As Long
    For Each pt In ActiveSheet.PivotTables
        For I = 1 To pt.PivotFields.Count
            With pt.PivotFields(I)
              If .Orientation = 0 Then .Orientation = xlDataField
            End With
        Next
    Next
End Sub