Dim ptSigmaRow As Excel.PivotField
For Each ptSigmaRow In ptTable.RowFields
Dim d As String = ptSigmaRow.Name
If ptSigmaRow.Name = "Data" Then
ptSigmaRow.Orientation = XlPivotFieldOrientation.xlColumnField
End If
Next
Thank you very much.
ReplyDeletePlease add this code after setting all pivoting field with require value. It works fantastic.
-M.Shekh
thanks!
ReplyDeleteI used this
_PivotField = (PivotField)_PivotTable.PivotFields("Data");
_PivotField.Orientation = XlPivotFieldOrientation.xlColumnField;