Created
May 5, 2022 12:49
-
-
Save conholdate-gists/44bc96798dbf6ae039981c701fffe786 to your computer and use it in GitHub Desktop.
Clear data from Excel spreadsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clear the content of an SLSX file | |
var aspose = aspose || {}; | |
// create an object of the Cells class. | |
aspose.cells = require("aspose.cells"); | |
// instantiates WorkBook child class with an XLSX file | |
var sampleFile = "sample.xlsx"; | |
var workbook = new aspose.cells.Workbook(sampleFile); | |
// call clear() method to clear all cell and row objects. | |
workbook.getWorksheets().get(0).getCells().clear(); | |
// save the data into a new xlsx file | |
workbook.save("result.xlsx"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment