Last active
August 8, 2022 12:36
-
-
Save conholdate-gists/c3f1983e7738e6c459bf48841df9b16a to your computer and use it in GitHub Desktop.
Convert Excel to XML in Node.js
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
var aspose = aspose || {}; | |
aspose.cells = require("aspose.cells"); | |
// Create an object of the Workbook class and load the source excel file | |
var wb = new aspose.cells.Workbook("sample.xlsx"); | |
// Instantiate an instance of the XmlSaveOptions() class that will be used to save a file in XML file format. | |
var XmlSaveOptions = new aspose.cells.XmlSaveOptions(); | |
// Invoke the save method to save the file | |
wb.save("DocumentConversionProgress.xml", XmlSaveOptions); |
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
var aspose = aspose || {}; | |
aspose.cells = require("aspose.cells"); | |
// instantiate an object of the Workbook class and load the source excel file | |
var wb = new aspose.cells.Workbook("sample.xlsx"); | |
// creaste an instance of the XmlSaveOptions() class that will be used to save a file in XML file format. | |
var XmlSaveOptions = new aspose.cells.XmlSaveOptions(); | |
// Call the setClearData method that makes the workbook empty after saving the file. | |
XmlSaveOptions.setClearData(flase); | |
// if value of setCreateDirectory is true, the directory will be automatically created before saving the file. | |
XmlSaveOptions.setCreateDirectory(true); | |
// setCachedFileFolder method is used to store some large data. | |
XmlSaveOptions.setCachedFileFolder(true); | |
// Invoke the save method to save the file | |
wb.save("DocumentConversionProgress.xml", XmlSaveOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment