You can read all the details at: Convert CSV to Excel or Excel to CSV File using Java
Created
January 19, 2021 22:27
-
-
Save aspose-com-gists/8fe0aa068ce23dadc02f3bd0e1802a28 to your computer and use it in GitHub Desktop.
Convert Excel XLSX XLS to CSV or CSV to Excel using Java
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
// Opening CSV Files | |
// Creating CSV LoadOptions object | |
LoadOptions loadOptions = new LoadOptions(FileFormatType.CSV); | |
// Creating an Workbook object with CSV file path and the loadOptions | |
// object | |
Workbook workbook = new Workbook(dataDir + "Book_CSV.csv", loadOptions); | |
workbook.save(dataDir + "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(dataDir + "CSVtoExcel.xlsx"); | |
// Save output CSV file | |
workbook.save(dataDir + "ExcelToCSV.csv" , SaveFormat.CSV); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment