我似乎无法获取要复制的数据透视表格式,我只能获取要传输的值。我使用这篇文章作为参考:复制数据透视表格式
这是我的代码:
Sub copyPaste(ByVal sht As Variant, ByVal cell As String)
Dim r As range
pt.TableRange2.Offset(1, 0).Copy
With wbReport.Sheets(sht).range(cell)
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
'.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
End With
End Sub
我错过了什么吗?