Description
Bug Report
- Host: Excel
- OS: Windows 10
- Browser: N/A
- Environment: PROD
Expected behavior:
In Desktop Version of Excel, running Pivot Table Samples should work
Actual behavior:
The steps where Pivot Table APIs are invoked, the samples crash with the following error
Rich API Error. AccessDenied. You cannot perform the requested Operation.
Please note:, there is absolutely no issue when the samples are run in Web version of Excel
Steps to Reproduce:
- Run Desktop version of Excel
- Launch ScriptLab Add-in
- Click on "Samples" and enter "Pivot" in Search box
- Click on "Create and Modify" Sample to run it
- From the "Run" menu, click on "Run In this Pane"
- Click on "Setup Sample" button
7.Next click on "Create" button. This results in the AccessDenied error logged to the Console
Failure Logs:
c {name: "RichApi.Error", code: "AccessDenied", traceMessages: Array[0], innerError: null, debugInfo: Object}
name: "RichApi.Error"
code: "AccessDenied"
traceMessages: Array[0]
innerError: null
▶debugInfo: Object
code: "AccessDenied"
message: "You cannot perform the requested operation."
toString: function ()
errorLocation: "PivotTableCollection.add"
statement: "var add=pivotTables.add(...);"
▶surroundingStatements: Array[9]
0: "..."
1: "var worksheet1=worksheets.getItem(...);"
2: "var range1=worksheet1.getRange(...);"
3: "// Instantiate {range1}"
4: "var worksheet2=worksheets.getItem(...);"
5: "var pivotTables=worksheet2.pivotTables;"
6: "// >>>>>"
7: "var add=pivotTables.add(...);"
8: "// <<<<<"
▶fullStatements: Array[1]