Learn how to convert Excel XLSX or XLS files to SVG using C#: https://blog.aspose.com/2021/10/15/convert-excel-to-svg-using-csharp/
Last active
October 15, 2021 17:06
-
-
Save aspose-com-gists/5048ca45afa67017c1271181930e213a to your computer and use it in GitHub Desktop.
Convert Excel XLSX or XLS to SVG in C#
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 | |
var workbook = new Workbook("sourceFile.xlsx"); | |
// Get reference of desired worksheet | |
var worksheet = workbook.Worksheets[0]; | |
// Set options for output image | |
var options = new Aspose.Cells.Rendering.ImageOrPrintOptions() | |
{ | |
OnePagePerSheet = true, | |
ImageType = Aspose.Cells.Drawing.ImageType.Svg | |
}; | |
// Convert Excel worksheet to SVG | |
var renderer = new Aspose.Cells.Rendering.SheetRender(worksheet, options); | |
renderer.ToImage(0, "output.svg"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment