Convert an Excel VSTO Workbook to an XLTX Template
Question details
The user needs to convert a customized Excel VSTO (Visual Studio Tools for Office) Workbook project into an XLTX Template project.

- Product
- Microsoft Excel and Visual Studio
- Device & OS
- not provided
- Scenario
- Attempting to save or migrate a fully coded VSTO workbook as a reusable template for other users.
- Observed behavior
- Standard Excel workbooks can easily be saved as XLTX files, but VSTO workbook projects cannot be automatically converted into VSTO Template projects.
Determine whether you need to convert only the visual spreadsheet format into a template, or if you need the underlying .NET VSTO code to function as a document-level template. Backup your Visual Studio project files before making changes.
Save the Standard Workbook as an XLTX File
Use this method if you only need the formatting, charts, and cell data of the workbook to act as a template, without the attached VSTO compiled code.
While VSTO projects cannot be converted with a single click, the underlying Excel workbook can still be saved as a standard template. This is useful if the visual layout is more important than the customized .NET code.
Open the .xlsx workbook associated with your VSTO project in Microsoft Excel.
Click on 'File' in the top-left corner of the ribbon and select 'Save As'.
In the 'Save as type' dropdown menu, select 'Excel Template (*.xltx)' and choose your desired save location.
Click 'Save' to finalize the template.

Migrate Code to a New VSTO Template Project
Since automatic conversion is not supported, you must manually create a template project and migrate your existing code to retain VSTO functionality.
Create and Manage Templates Easily with WPS Office
VSTO customizations are specific to Microsoft Excel and require complex developer environments. If you only need to create, manage, and share standard spreadsheet templates without custom .NET code, WPS Office is an excellent, free alternative. It is highly compatible with Microsoft formats and offers a user-friendly interface.
- 1. Download and Install: Visit the official WPS Office website and download the free spreadsheet application.
- 2. Open Your Workbook: Launch WPS Spreadsheets and open your existing .xlsx file.
- 3. Save as Template: Go to Menu > Save As, and choose 'WPS Spreadsheets Template (*.xltx)' to create your reusable template.

Frequently Asked Questions
Why can't I convert my VSTO workbook to a template automatically?
Visual Studio maintains different project structures, configuration files, and deployment manifests for Workbooks versus Templates. These underlying structural differences prevent a simple one-click conversion.
Will my existing macros work if I save a VSTO workbook as a template?
VSTO uses compiled .NET code rather than standard VBA macros. While VBA macros (saved in an .xltm file) transfer easily, VSTO document-level customizations require proper Visual Studio project deployment to function in new documents.
Where can I get help migrating my VSTO code?
For detailed coding and deployment guidance, it is highly recommended to consult developer communities like Stack Overflow. Use specific tags such as 'vsto', 'excel', and 'c#' to get accurate assistance from other developers.
Can I use VSTO projects in WPS Office?
No, VSTO (Visual Studio Tools for Office) is a proprietary Microsoft technology designed specifically for Microsoft Office. WPS Office supports standard workbook formats (.xlsx) and standard VBA macros, but not compiled VSTO .NET assemblies.




