If your workflow is blocked, confirm the account and app context, then follow the ordered fixes below.
Problem Description: Setcolumnwidth Broken Excel Scripts
I have written a very simple code in Office Scripts which should simply set some column widths and the header rows (see below). However, when I run the script, the column widths are nowhere near the values I have input (I have added comments to show the column widths which get set when the script is run). Is this a general issue with .setColumnWidth() or have I missed something? ```typescript function main(workbook: ExcelScript.Workbook) { let sheets = workbook.getWorksheets(); sheets.forEach(sheet => { sheet.getRange("E:G").getFormat().setColumnWidth(14.00); //becomes 2.00 (19px) sheet.getRange("H:I").getFormat().autofitColumns; sheet.getRange("J:J").getFormat().setColumnWidth(25.00); //becomes 4.00 (33px) sheet.getRange("L:L").getFormat().setColumnWidth(16.43); //becomes 2.43 (22px) sheet.getRange("S:S").getFormat().setColumnWidth(11.43); //becomes 1.43 (15px) sheet.getRange("U:U").getFormat().setColumnWidth(19.29); //becomes 3.00 (26px) sheet.getRange("1:1").getFormat().autofitRows(); }) } ```
Quick Answer for VBA Quick Fix
setColumnWidth() has been confirmed to incorrectly set column widths, and this issue is being investigated internally (tracking #9333095).
Likely Causes Behind Excel Failure Patterns
The Microsoft account or license context may not match the purchase or device.
Cached credentials, outdated builds, or damaged local components can trigger vba & macro problems.
A file-specific corruption or add-in conflict can mimic a broader application failure.
Recommended Solution: Fixing VBA Step by Step
When to use this: Apply these steps when the symptoms match and you can access the relevant Microsoft account or administrator.
As a workaround, try using different values in the API until you achieve the desired column width.
Follow up for updates once more information is available from the investigation team.
Alternative Solutions for Fallback Options for VBA
Retry the Microsoft-side steps after restarting the app and device.
Test the same action in a private browser session or a new blank file to isolate account vs file issues.
Capture exact error text and screenshots before contacting Microsoft Support or your administrator.
Working with WPS Office: Editing Files in WPS During VBA

WPS Office cannot replace Microsoft account, activation, or cloud fixes for this scenario. It remains one of the best free Microsoft Office-compatible alternatives for opening and editing local files.
Download and install WPS Office from the official website.
Open local Word, Excel, PowerPoint, or PDF files in the matching WPS app.
Save a working copy locally while Microsoft-side issues are resolved.
Return to Microsoft Office after the primary fix succeeds.
If you need a practical local workspace in the meantime, try WPS Office.
Prevention Tips for Smooth Excel Device Transfers
Keep one primary Microsoft account for subscriptions and Office sign-in.
Install updates for Office and Windows before retrying failed workflows.
Back up important files before repair, reset, or reinstall actions.
Document exact error messages before the next troubleshooting attempt.
FAQs About VBA Help Topics
Can WPS Office fix this vba & macro problems issue directly? Only when the WPS steps match the formatting or file task. Account, activation, and cloud issues stay on the Microsoft side.
Should I reinstall Excel before trying these steps? Not first. Confirm account, license, and the exact error before reinstalling.
What should I send to Microsoft Support? The affected account email, device type, Office version, exact error text, and screenshots with personal data hidden.





