This quick guide explains how to remove table format in Excel using Node.js. It provides all the necessary details to develop this application, say the IDE settings, a list of programming steps, and a running sample code showing how to remove table in Excel using Node.js. This sample code will delete the table formatting and total line if added, however, it will not delete the raw data.
Steps to Clear Table Format in Excel using Node.js
- Set the IDE to use Aspose.Cells for Node.js via Java to remove a table
- Load the source Excel file into the Workbook object having tables in it
- Obtain the first worksheet and access the collection of ListObjects
- Set the ShowTotals flag of the target table to false
- Call the removeAt() method by passing the table index
- Save the resultant Excel file with raw data
These steps describe how to clear table format in Excel using Node.js. The process is quite simple as you may load the workbook, access the target sheet, and get a reference to the collection of the tables sorted as ListObjectCollection. Finally, remove the table at the defined index and save the output file.
Code to Remove Excel Table using Node.js
This code demonstrates how to undo table in Excel using Node.js. The setShowTotals(false) is optional therefore, you may use it only if the total line is displayed at the end of the table. If the table has the total row and you do not call this method, it will add an extra empty total line after removing the table format.
In this topic, we have learned how to remove table format in Excel using Node.js. To apply the Excel theme, refer to the article on Apply Excel theme with Node.js.