Skip to main content
Any Framework

Syncfusion ExcelChartToImageConverter is a .NET class library for converting Excel chart to image in any ASP.NET MVC application without using Microsoft Office dependencies. This package is a supporting package for Syncfusion’s Excel library.

Published
Sep 30, 2021
5y ago
Total Downloads
285.1K
285,116

Install

dotnet add package Syncfusion.ExcelChartToImageConverter.AspNet.Mvc5 --version 19.3.0.43

No framework information available.

README

Syncfusion ExcelChart-to-Image converter is a .NET class library for converting Excel chart to image in any ASP.NET MVC application without using Microsoft Office dependencies.

Key features

  • Following chart types are supported in Excel Chart To Image Conversion.

    • Area
    • Area_Stacked
    • Area_Stacked_100
    • Area_3D
    • Bar_Clustered
    • Bar_Stacked
    • Bar_Stacked_100
    • Bar_Clustered_3D
    • Bar_Stacked_3D
    • Bar_Stacked_100_3D
    • Bubble
    • Column_Clustered
    • Column_Stacked
    • Column_Stacked_100
    • Column_3D
    • Column_Clustered_3D
    • Column_Stacked_3D
    • Column_Stacked_100_3D
    • Doughnut
    • Doughnut_Exploded
    • Line
    • Line_Markers
    • Line_3D
    • Pie
    • Pie_Exploded
    • Pie_3D
    • Pie_Exploded_3D
    • Radar
    • Radar_Filled
    • Radar_Markers
    • Scatter_Line
    • Scatter_Line_Markers
    • Scatter_Markers
    • Scatter_SmoothedLine
    • Scatter_SmoothedLine_Markers
    • Stock_HighLowClose
    • Stock_OpenHighLowClose
    • Funnel
    • Waterfall
    • Histogram
    • Pareto
  • Following chart elements are supported in Excel Chart to Image Conversion.

    • Axis
    • Axis titles
    • Chart title
    • Data labels
    • Grid lines
    • Legend
    • Trend line

Getting Started

Installation commands

  • Simply run Install-Package Syncfusion.ExcelChartToImageConverter.AspNet.Mvc5 from the Package Manager Console in Visual Studio to fetch the NuGet package.
  • If you already have Syncfusion.ExcelChartToImageConverter.AspNet.Mvc5 for .NET and want to upgrade the version, please run Update-Package Syncfusion.ExcelChartToImageConverter.AspNet.Mvc5 to get the latest version.
  • You can run the following snippets in your environment to see how Syncfusion.ExcelChartToImageConverter.AspNet.Mvc5 works.

Convert the chart in Excel workbook to Image

The following code snippet explains how to convert an Excel chart to Image.

//Initialize ExcelEngine.
using (ExcelEngine excelEngine = new ExcelEngine())
{
    //Initialize IApplication.
    IApplication application = excelEngine.Excel;
	//Set the default version as Xlsx.
    application.DefaultVersion = ExcelVersion.Xlsx;
	//Initialize ChartToImageConverter.
    application.ChartToImageConverter = new ChartToImageConverter();
	//Set the Best scaling mode to ChartToImageConverter.
    application.ChartToImageConverter.ScalingMode = ScalingMode.Best;
	//Load an existing workbook into IWorkbook.
    IWorkbook workbook = application.Workbooks.Open(Server.MapPath("App_Data/Sample.xlsx"));
    //Get the worksheet into IWorksheet.
    IWorksheet worksheet = workbook.Worksheets[0];
	//Get the chart into IChart.
    IChart chart = worksheet.Charts[0];
    //Convert the Chart to Image
    MemoryStream stream = new MemoryStream();
    chart.SaveAsImage(stream);
    //Save the Image.
    Image image = Image.FromStream(stream);
    image.Save("Output.png");
}

Resources

Support and feedback

License

This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a licnense here or start a free 30-day trial here.

About Syncfusion

Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 26,000+ customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.

Today, we provide 1600+ components and frameworks for web (Blazor, ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Flutter), mobile (Xamarin, Flutter, UWP, and JavaScript), and desktop development (WinForms, WPF, WinUI, Flutter and UWP). We provide ready-to-deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.

This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. To acquire a license, you can purchase one here or start a free 30-day trial here.


[email protected] | www.syncfusion.com | Toll Free: 1-888-9 DOTNET

Changes from Previous Version

v19.2.0.62v19.3.0.43

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.