Is it possible to construct a PivotTable from a variant 2 dimensional array?
If it is the case what are the parameters of the object Pivotcache (SourceType:=...)
The following code raise an error
-13: type incompability-
(idem with SourceType:=xlDatabase)
Code:
Sub test1()
Dim PC As PivotCache
Quote:
|
quote:rv is a 2D variant array; 1st line contains valid strings
|
Set PC = ActiveWorkbook.PivotCaches.Add(SourceType:=xlExternal, SourceData:=rv)
...
End Sub
The help on SourceType is not very helpful as xlDatabase and xlExternal are not even mentionned...
Anne-Olga