Created
December 26, 2025 14:51
-
-
Save aspose-com-gists/babe0597809a7ce679628ed54768f6be to your computer and use it in GitHub Desktop.
Convert CSV to Excel in C# with Aspose.cells
This file contains hidden or 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
| using Aspose.Cells; | |
| using System; | |
| class CsvToExcelConverter | |
| { | |
| static void Main() | |
| { | |
| // Path to the CSV file | |
| string csvPath = "input.csv"; | |
| // Path to the output Excel file | |
| string excelPath = "output.xlsx"; | |
| // Load CSV file into a Workbook | |
| LoadOptions loadOptions = new LoadOptions(LoadFormat.Csv); | |
| Workbook workbook = new Workbook(csvPath, loadOptions); | |
| // Save as XLSX format | |
| workbook.Save(excelPath, SaveFormat.Xlsx); | |
| Console.WriteLine("Conversion completed successfully."); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment