Created
April 29, 2021 01:20
-
-
Save aspose-com-gists/abd903fb9bdac23bae74e548f4458445 to your computer and use it in GitHub Desktop.
Convert CSV to Excel or Excel to CSV File 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
// Create CSV LoadOptions object | |
var loadOptions = aspose.cells.LoadOptions(aspose.cells.FileFormatType.CSV); | |
// Create an Workbook object with CSV file path and the loadOptions | |
var workbook = aspose.cells.Workbook("data.csv", loadOptions); | |
// Save CSV as XLSX | |
workbook.save("CSVtoExcel.xlsx" , aspose.cells.SaveFormat.XLSX); |
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
// Load the Excel file | |
var workbook = aspose.cells.Workbook("CSVtoExcel.xlsx"); | |
// Save as CSV | |
workbook.save("ExcelToCSV.csv" , aspose.cells.SaveFormat.CSV); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment