Convert DOTM to EXCEL via C#

Convert DOTM to EXCEL via C# without using Microsoft® Word or Microsoft® Excel


By using Aspose.Total for .NET you can convert DOTM to EXCEL within any .NET, C#, ASP.NET and VB.NET application in two simple steps. Firstly, by using Aspose.Words for .NET , you can export DOTM to HTML. After that, by using Aspose.Cells for .NET Spreadsheet Programming API, you can convert HTML to EXCEL.

Convert DOTM to EXCEL via C#

  1. Open DOTM file using Document class
  2. Convert DOTM to HTML by using Save method
  3. Load HTML document by using Workbook class
  4. Save the document to XLSX format using Save method and set Xlsx as SaveFormat

Get Started with .NET File Automation APIs

Install from the command line as nuget install Aspose.Total or via Package Manager Console of Visual Studio.

Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .

Convert Protected DOTM to EXCEL via C#

Using the API, you can also open the password-protected document. If your input DOTM document is password protected, you cannot convert it to EXCEL without using the password. The API allows you to open the encrypted document by passing the correct password in a LoadOptions object. The following code example shows how to try opening an encrypted document with a password:

Convert DOTM to Protected EXCEL file via C#

After you convert DOTM to EXCEL, you can also encrypt and password protect your EXCEL documents. In order to encrypt your document, open it using Workbook class and specify XOR Encryption Type and Strong Encryption type (RC4, Microsoft Strong Cryptographic Provider) encryption by using the SetEncryptionOptions method. You can also set a password to your EXCEL by using the Password property of WorkbookSettings class.

Other Conversion Options

DOTM TO TSV (Tab Seperated Values)
DOTM TO XLAM (Excel Macro-Enabled Add-In)
DOTM TO SXC (StarOffice Calc Spreadsheet)
DOTM TO CSV (Comma Seperated Values)
DOTM TO ODS (OpenDocument Spreadsheet)
DOTM TO FODS (OpenDocument Flat XML Spreadsheet)
DOTM TO XLSM (Macro-enabled Spreadsheet)
DOTM TO XLTX (Excel Template)
DOTM TO XLS (Microsoft Excel Spreadsheet (Legacy))
DOTM TO XLSX (Open XML Workbook)
DOTM TO DIF (Data Interchange Format)
DOTM TO XLSB (Excel Binary Workbook)
DOTM TO XLT (Excel 97 - 2003 Template)

DOTM What is DOTM File Format?

A file with DOTM extension represents template file created with Microsoft Word 2007 or higher. It is similar to the popular DOCX file format other than it retains the user defined settings for reuse in case of creating new documents. Such documents are more often used in offices where a standard template file is generated with settings like page information, margins, default layout and macros, and is used to create new documents from it when required. DOTM files, however, save macros, that are a series of commands in the form of recorded actions for automatic completion of a task. This helps save time in carrying out actions that are repeated in completion of a task.

Read More

XLSX What is XLSX File Format?

XLSX is well-known format for Microsoft Excel documents that was introduced by Microsoft with the release of Microsoft Office 2007. Based on structure organized according to the Open Packaging Conventions as outlined in Part 2 of the OOXML standard ECMA-376, the new format is a zip package that contains a number of XML files. The underlying structure and files can be examined by simply unzipping the .xlsx file.

Read More