Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created October 21, 2021 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/e96bce4be59509ab59eb7a3bb530006d to your computer and use it in GitHub Desktop.
Save aspose-com-gists/e96bce4be59509ab59eb7a3bb530006d to your computer and use it in GitHub Desktop.
Convert Excel to CSV and CSV to Excel on Linux

Learn how to convert CSV to Excel and Excel to CSV on Linux:

// 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);
// 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