This article guides on how to format table in Word with NET REST API. You will learn the process to modify the MS Word table design with C# Low Code API using the .NET cloud SDK. It shares all the necessary details to configure the environment for the development and customize the output file.
Prerequisite
- Create an account and get API credentials
- Download Aspose.Words Cloud SDK for Dotnet to update table format in a Word file
- Setup C# solution project with the above SDK for changing table design
Steps to Update Table Design in Word with C# REST API
- Instantiate the WordsApi class object by providing the client ID and secret to format a table
- Create an object of the TableProperties class to customize the table
- Set the target table by providing the table index and node path
- Call the UpdateTablePropertiesOnline() method by providing the request object
- Retrieve the output file from the API response object and save it on the disk
The above steps describe how to set table design in MS Word with C# REST API. Create and initialize an object of the WordsApi class, declare an object of the UpdateTablePropertiesOnlineRequest class fill it, and instantiate the TableProperties object for setting the properties of the table. Finally, invoke the UpdateTablePropertiesOnline() method to update the table properties.
Code to Set Word Table Properties with C# Low Code API
This sample code exhibits the process of updating the Word table settings with C# Low Code API. The TableProperties class contains the attributes that you can set to customize the output table. Set the target section of the document using the NodePath property in the UpdateTablePropertiesOnlineRequest class and Index for targeting the table.
This article has taught us to work with table design for Word with NET REST API. If you are inclined to remove borders from a Word file, refer to the following article: Remove borders in Word with NET REST API.