Forum Discussion
Is the Excel Review -> Optimise feature available through Microsoft.Office.Interop.Excel
Hello Excel community,
We have a client with a large collection of Workbooks that they copy every year to produce the next 'generation' of workbooks. Many of these workbooks are overweight with respect to file size, and performance. Is it possible, using dotnet and the Excel Interop COM objects to invoke the Optimise wizard that is available in the Excel user interface? Review -> Performance -> Optimize all
1 Reply
- NikolinoDEGold Contributor
At this time…and so far i know...
The “Optimize All / Optimize Sheet” wizard is not available via Microsoft.Office.Interop.Excel COM interfaces.
There is no public API to invoke it.
The publicly documented “Excel VBA / Interop / COM” libraries provide many controls over workbook content, formatting, calculation modes, etc., but nothing that appears to map to this new Performance/Optimize wizard tool.
To automate similar performance improvements, you’ll have to build your own cleanup/optimization logic via Interop or use third-party libraries/tools.
Here a example in VBA: see the attached file
This way your client can bulk-clean an entire year’s worth of workbooks in one go.
Back up the folder before running — this script overwrites files in place.
Hidden sheets and custom styles will also be processed — if some styles are needed, comment out the st.Delete loop. Large folders may take a while (Excel has to open, process, save each file).
Alternative you can choice a AddIn from Internet.
1. Inquire Add-in (built into Office Professional Plus / Microsoft 365 Apps for enterprise)
- Includes “Workbook Clean-up” under Inquire → Clean Excess Formatting.
- Not always installed by default, but can be enabled under COM Add-ins.
2. Third-party optimization add-ins
- Tools like Kutools for Excel, ASAP Utilities, and others include workbook cleanup functions.
- These are paid, but they can batch-process workbooks to reduce file size.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.