Learn how to convert CSV to Excel and Excel to CSV on Linux:
Created
October 21, 2021 14:30
-
-
Save aspose-com-gists/e96bce4be59509ab59eb7a3bb530006d to your computer and use it in GitHub Desktop.
Convert Excel to CSV and CSV to Excel on Linux
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 LoadOptions object | |
LoadOptions loadOptions = new LoadOptions(LoadFormat.CSV); | |
// Create a Workbook object with CSV file's path and the loadOptions object | |
Workbook workbook = new Workbook("Sample.csv", loadOptions); | |
// Save CSV as Excel file | |
workbook.Save("CSVtoExcel.xlsx", 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 input Excel file | |
Workbook workbook = new Workbook("CSVtoExcel.xlsx"); | |
// Save Excel file as CSV file | |
workbook.Save("ExcelToCSV.csv", SaveFormat.CSV); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment