When I execute WIN32OLE::new(‘excel.Application’) in SketchUp 2026 Ruby control platform, an error occurs, but there was no such issue in previous versions.
What is the error message?
If it is: #<NameError: uninitialized constant WIN32OLE>
… this means you have not used require 'win32ole' to first load the WIN32OLE library.
If the message is similar to:
#<WIN32OLERuntimeError:"unknown OLE server: 'Excel.Application'\n HRESULT error code:0x800401f3\n Invalid class string">
… then Excel is either not installed on the system, or the Excel installation (or it’s OLE registration) is corrupt.
WIN32OLE::new(‘excel.Application’)
#<WIN32OLERuntimeError:“failed to create WIN32OLE object from `excel.Application’\n HRESULT error code:0x80080005\n Server execution failed”>
(eval):1:in `initialize’
(eval):1:in `new’
(eval):1:in `’
SketchUp:in `eval’
=> nil but it works in 2024
When you installed SketchUp 2026, did you do the online upgrade from within an older SketchUp version? … or did you download the offline installer and run it via right-click “Run as administrator” ?
TEST: Run SketchUp 2026 as Administrator
Temporarily try running SketchUp 2026 as an administrator (Right-click on the SketchUp icon → Run as administrator).
If this makes the WIN32OLE call work, it confirms the problem is a missing permission on the SketchUp 2026 process’s part, which running as administrator bypasses. If the problem persists even when running as administrator, the issue is more advanced and likely requires the DCOM settings.
I asked the Gemini AI about your error message:
The error message WIN32OLERuntimeError: "failed to create WIN32OLE object from 'Excel.Application' HRESULT error code:0x80080005 Server execution failed" indicates a COM/DCOM communication failure when the Ruby environment (SketchUp Console) tries to launch the Microsoft Excel application process.
The specific HRESULT error code, 0x80080005 (CO_E_SERVER_EXEC_FAILURE), generally means the COM server (Excel) failed to start up or execute. This is a common issue when running Office applications via automation in a non-interactive session or an elevated process, as is often the case when a host application like SketchUp calls out to an external program.
AI suggested Solution for 0x80080005 COM/DCOM error (click to expand) ...
The issue is almost certainly due to a change in how SketchUp 2026 handles its security privileges, which affects the ability of its Ruby process to launch the Microsoft Excel application via COM/DCOM. The error code $\mathbf{0x80080005}$ means “Server execution failed,” which is a classic DCOM permission error.
Since the problem is specific to the version jump (2024 to 2026), the fix is to adjust Windows’ DCOM security settings for Excel.
Solutions to Apply in SketchUp 2026
You need to ensure the SketchUp 2026 process has the necessary permissions to activate Excel.
With SketchUp closed …
Step 1: Set DCOM Identity to Interactive User
This forces Excel to launch under the context of the currently logged-in user, which is what the SketchUp process is using.
- Open the Component Services console.
- Press Windows key + R, type
dcomcnfg, and press Enter.
- Navigate the tree structure on the left:
- Component Services $\rightarrow$ Computers $\rightarrow$ My Computer $\rightarrow$ DCOM Config.
- Scroll down to find Microsoft Excel Application.
- Right-click on Microsoft Excel Application and select Properties.
- Go to the Identity tab.
- Select the The interactive user option.
- Click Apply or OK.
Step 2: Grant Explicit DCOM Permissions
If Step 1 does not resolve the issue, you must explicitly grant permissions to the user groups.
- In the same Properties window for Microsoft Excel Application, go to the Security tab.
- Under Launch and Activation Permissions, select Customize, and click the Edit… button.
- Ensure your current Windows username and the Interactive user group are listed and have Local Launch and Local Activation permissions checked.
- Click OK.
- Repeat this verification process for the Access Permissions and Configuration Permissions sections to ensure the necessary Local Access and Full Control permissions are in place for your user.
After completing these steps, restart SketchUp 2026 and test your Ruby code. This is the definitive fix for the DCOM 0x80080005 error when using WIN32OLE to control Excel.
thanks,running SketchUp 2026 as an administrator (Right-click on the SketchUp icon → Run as administrator). it works.
You never answered the question about how SU2026 was installed.
i download the offline installer but didn’t run it via right-click “Run as administrator”
Well then, do so and choose the Repair option.