Created
March 22, 2024 09:59
-
-
Save conholdate-gists/4e372bd6ed768f0e05a78b5d58832b17 to your computer and use it in GitHub Desktop.
Convert Excel XLSX XLS to JSON in C# .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
// Load Excel file | |
Workbook wb = new Workbook("Workbook.xlsx"); | |
// Create JsonSaveOptions class object | |
Aspose.Cells.JsonSaveOptions options = new Aspose.Cells.JsonSaveOptions(); | |
options.SkipEmptyRows = true; | |
options.ExportAsString = true; | |
// Save as JSON | |
wb.Save("Excel_to_JSON.json", options); |
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 Excel file | |
Workbook wb = new Workbook("Workbook.xlsx"); | |
// Save as JSON | |
wb.Save("Excel_to_JSON.json", Aspose.Cells.SaveFormat.Json); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment