Application : Excel web Add-in office js using Angular
Scenario : When Started Copy a sheet in Excel Web Add-in application using button and then moved to another Blank excel workbook getting 500 issue in web Add-in application. Below is the debug Info
Debug Info :
{"code":"GeneralException","message":"There was an internal error while processing the request.","errorLocation":"Worksheet.copy","statement":"var copy = worksheet.copy(...);",
"surroundingStatements":["var workbook = context.workbook;","var worksheets = workbook.worksheets;","var worksheet = worksheets.getItem(...);",
"// >>>>>","var copy = worksheet.copy(...);","// <<<<<","copy.name = ...;","copy.visibility = ...;","copy.position = ...;",
"var worksheet1 = worksheets.getItem(...);","worksheets.load([\"name\"]);"],
"fullStatements":["var workbook = context.workbook;","var worksheets = workbook.worksheets;",
"var worksheet = worksheets.getItem(\"My_Template\");","var copy = worksheet.copy(\"None\", worksheet);",
"copy.name = \"State Tax Rate\";","copy.visibility = \"Visible\";","copy.position = 2;",
"var worksheet1 = worksheets.getItem(\"State Tax Rate\");","worksheets.load([\"name\"]);"]}