You can read all details at: Convert CSV to Excel Files or Excel to CSV using C# VB.NET
Last active
September 22, 2022 05:29
-
-
Save aspose-com-gists/dc8b6ddbd18db9adf2897a75769b5cdb to your computer and use it in GitHub Desktop.
Convert CSV to Excel or XLSX/XLS to CSV with C# VB.NET
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 for CSV file | |
LoadOptions loadOptions = new LoadOptions(LoadFormat.CSV); | |
// Create a Workbook object and initialize with CSV file's path and the LoadOptions object | |
Workbook workbook = new Workbook("Sample.csv", loadOptions); | |
// Save CSV file as XLSX | |
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 XLSX 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