PivotCaches

D

didi

Hi All
JScript, Excel2003

var Excel = new ActiveXObject('Excel.Application');
Excel.Visible = true;
var Worbook = Excel.Workbooks.Add();
pc = Excel.ActiveWorkbook.PivotCaches.Add(2);
Error!!! Object doesn't support this property or method

MSDN:
Returns a PivotCaches collection that represents all the PivotTable caches
in the specified workbook. Read-only.
Applies to | Workbook Object

Why?
Thanks.
 
C

Christophe Niel

didi said:
Hi All
JScript, Excel2003

var Excel = new ActiveXObject('Excel.Application');
Excel.Visible = true;
var Worbook = Excel.Workbooks.Add();
pc = Excel.ActiveWorkbook.PivotCaches.Add(2);
Error!!! Object doesn't support this property or method

MSDN:
Returns a PivotCaches collection that represents all the PivotTable caches
in the specified workbook. Read-only.
Applies to | Workbook Object

Why?
Thanks.

You can't add because it's a "Read Only" property.
Why is it read-only? because you can't add PivotCache in excel using this
method.

What did you want to do in ther first place?

Christophe
 
Top