设置visibility为1时OfficeJS任务窗格插件致Excel崩溃问题求助
Yep, I’ve encountered this exact issue with multiple clients running Office 365 Excel builds 1903 through 1905 (including Insider channels). You’re spot-on to suspect this is an Excel bug rather than an issue with your add-in code. Here’s what we know and some workarounds:
Background
The crash triggers consistently when the visibility="1" setting is configured in taskpane.xml, which makes the "New Office Add-in" task pane auto-open when the Excel file launches. Clicking the "Trust this add-in" button hits an unhandled error in Excel’s security workflow for auto-launched task panes.
Your relevant configuration snippet:
<wetp:taskpanes xmlns:wetp="http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11"> <wetp:taskpane dockstate="right" visibility="1" width="350" row="7"> <wetp:webextensionref xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1"/> </wetp:taskpane> </wetp:taskpanes>
Workarounds (No XML-Only Fix Currently Known)
- Disable auto-launch temporarily: Change
visibility="1"tovisibility="0"in yourtaskpane.xml. Users can still manually open the task pane via the add-in ribbon, and the "Trust this add-in" button works without crashing in this scenario. - Pre-trust the add-in (Organizational Deployments): If this is for a company-wide rollout, use the Office 365 Admin Center to pre-configure trust settings for the add-in. This bypasses the "Trust this add-in" prompt entirely for end users.
- Roll back to an older build: Some users confirmed the crash doesn’t occur in Excel builds prior to 1903, though this isn’t a long-term solution since it skips critical security and feature updates.
Next Steps
There’s no documented XML tweak within the Excel file that resolves this crash while keeping auto-launch enabled. Your best move is to report the bug directly to Microsoft:
- If you’re on the Insider channel, use the built-in feedback tool in Excel (go to File > Feedback > Send a Frown).
- For regular Office 365 users, submit a support ticket through the Office admin portal or Microsoft 365 support site.
内容的提问来源于stack exchange,提问作者roloc03

