Aspose.Total for .NET is a comprehensive suite of .NET components that enables developers to easily create, manipulate and convert various file formats within any .NET, C#, ASP.NET and VB.NET application. It provides a wide range of features and capabilities, including the ability to convert DOTX to JSON format. This can be done in two simple steps.
The first step is to use Aspose.Words for .NET to export the DOTX file to HTML. Aspose.Words for .NET is a powerful .NET library that enables developers to create, manipulate and convert various document formats, including DOTX. It provides a wide range of features and capabilities, such as the ability to export DOTX to HTML.
The second step is to use Aspose.Cells for .NET to convert the HTML to JSON. Aspose.Cells for .NET is a powerful Spreadsheet Programming API that enables developers to create, manipulate and convert various spreadsheet formats, including HTML. It provides a wide range of features and capabilities, such as the ability to convert HTML to JSON.
By using Aspose.Total for .NET, developers can easily convert DOTX to JSON format within any .NET, C#, ASP.NET and VB.NET application. It provides a simple and straightforward way to convert DOTX to JSON in two simple steps. Firstly, by using Aspose.Words for .NET, developers can export DOTX to HTML. After that, by using Aspose.Cells for .NET, developers can convert HTML to JSON.
Convert DOTX to JSON Format via C#
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 DOTX to JSON Format via C#
Using the API, you can also open the password-protected document. If your input DOTX document is password protected, you cannot convert it to JSON format 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 DOTX to JSON in Range via C#
While you are converting DOTX to JSON, you can also set range to your output JSON format. In order to set the range, you can open the converted HTML using Workbook class, get CellsCollection of the Worksheet containing the data, create a range from CellsCollection by specifying row & column indices, and call ExportRangeToJson method with references to Range & ExportRangeToJsonOptions objects. Finally, you can save the JSON data to file via File.WriteAllText method.