JavaScript & WorkBook.PivotCaches

  • Thread starter Thread starter mcessna
  • Start date Start date
M

mcessna

[Environment]
Microsoft Excel 2007 SP2
Windows Vista SP2
IE 8

[Description of Problem]
I've been unable to create a pivot table in client-side JavaScript. In the
VS 2005 debugger the WorkBook.PivotCaches object doesn't even show up, and I
get the standard "object doesn't support this property or method" error
message when trying to access it.

[Example]

this.WorkBook.PivotCaches.Add(xlDatabase,
sPivotSourceName).CreatePivotTable("", sPivotTableName);

The same code works in VBScript:

this.WorkBook.PivotCaches.Add(xlDatabase, sPivotSourceName).CreatePivotTable
"", sPivotTableName

I could [not] find an example where PivotCaches could be accessed in
JavaScript, and I found one other person who had the same issue.

Is this a known issue? If so, does anyone know why it doesn't work?

Thanks

Regards,

Michael Cessna
 
I've noe done the type of thing you are doing, but in native Excel, I've
always used

ThisWorkbook not This.Workbook

HTH,

Barb Reinhardt
 
Back
Top