Open matheushoeltgebaum opened 1 month ago
Here are some similar issues that might help you. Please check if they can solve your problem.
Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)
Hi i have noticed my system has some internal issue.i installed on another system and checked.now working fine
Reference:
Powered by issue-sentinel
Hi, @matheushoeltgebaum,
Thank you for bringing this issue to our attention.
I was able to reproduce the problem on both Excel and PowerPoint, across Desktop and Web versions. After thorough testing, I can confirm that this is indeed an API-related issue rather than a usage error.
I have reported the problem to the relevant team, and they are now aware of it (#9911046). We will keep you updated on any progress or potential workarounds.
Let me know if you have any further questions!
Best,
Provide required information needed to triage your issue
Your Environment
Expected behavior
When trying to iterate over and delete custom properties from the document that met a certain condition, it should delete the properties.
Current behavior
In Excel and PowerPoint APIs, I am loading the custom properties, by calling the
load
function with the parameter "items/key". Then, I iterate through the items and check if the property key meets a condition. If it does, I call thedelete
function. Otherwise, I do nothing.When I execute the code as mentioned above, it throws exceptions, for both Excel and PowerPoint.
As I execute the same code with the Word API, it works, no exceptions are thrown.
Steps to reproduce
For Excel:
For PowerPoint:
Provide additional details
Link to live example(s)
Context
My team is converting a COM/VSTO add-in to use the new Office JS APIs, and we need to make use of the custom properties of documents, since we already use them in our current COM/VSTO add-in.
Useful logs
This is the exception throw in Excel:
{ "stack": "RichApi.Error: A API que você está tentando usar não foi encontrada. Ela pode estar disponível em uma versão mais recente do Excel. Consulte a documentação: \"https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/excel-api-requirement-sets\".\n at new n (https://appsforoffice.microsoft.com/lib/1/hosted/excel-win32-16.01.js:25:266633)\n at r.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/1/hosted/excel-win32-16.01.js:25:331795)\n at https://appsforoffice.microsoft.com/lib/1/hosted/excel-win32-16.01.js:25:329856", "message": "A API que você está tentando usar não foi encontrada. Ela pode estar disponível em uma versão mais recente do Excel. Consulte a documentação: \"https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/excel-api-requirement-sets\".", "name": "RichApi.Error", "code": "ApiNotFound", "traceMessages": [], "innerError": null, "debugInfo": { "code": "ApiNotFound", "message": "A API que você está tentando usar não foi encontrada. Ela pode estar disponível em uma versão mais recente do Excel. Consulte a documentação: \"https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/excel-api-requirement-sets\".", "errorLocation": "CustomPropertyCollection.getItemAt", "statement": "var itemAt = custom.getItemAt(...);", "surroundingStatements": [ "var workbook = context.workbook;", "var properties = workbook.properties;", "var custom = properties.custom;", "// >>>>>", "var itemAt = custom.getItemAt(...);", "// <<<<<", "itemAt.delete();" ], "fullStatements": [ "Please enable config.extendedErrorLogging to see full statements." ] }, "httpStatusCode": 400 }
And this is the exception thrown in PowerPoint:
{ "stack": "RichApi.Error: GeneralException\n at new n (https://appsforoffice.microsoft.com/lib/1/hosted/powerpoint-win32-16.01.js:26:251423)\n at r.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/1/hosted/powerpoint-win32-16.01.js:26:316755)\n at https://appsforoffice.microsoft.com/lib/1/hosted/powerpoint-win32-16.01.js:26:314815", "message": "GeneralException", "name": "RichApi.Error", "code": "GeneralException", "traceMessages": [], "innerError": null, "debugInfo": { "code": "GeneralException", "message": "GeneralException", "errorLocation": "CustomPropertyCollection.getItemAt", "statement": "var itemAt = customProperties.getItemAt(...);", "surroundingStatements": [ "var root = context.root;", "var properties = root.properties;", "var customProperties = properties.customProperties;", "// >>>>>", "var itemAt = customProperties.getItemAt(...);", "// <<<<<", "itemAt.delete();" ], "fullStatements": [ "Please enable config.extendedErrorLogging to see full statements." ] }, "httpStatusCode": 500 }