Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Param
0ImageFormat

The file format ExcelWriter will save the chart as. Supported file types include GIF, JPEG, BMP, PNG, EMF, EXIFTIFF, and WMF

Exceptions

Exception
System.Exception
System.Exception

If there is a problem creating, opening, or writing to the file specified, or reading from the workbook Chart object.

Example
Code Block
csharp
csharp
titleC#
           ExcelApplication xla = new ExcelApplication();
           Workbook WB= xla.Create(FileFormat.Xlsx);
           Chart chartOne= WB[0].Charts[0];          
           chartOne.SaveImage("Path/filename.png"), System.Drawing.Imaging.ImageFormat.Png);            
Code Block
vb.net
vb.net
titlevb.net
	   Dim oExcelApp As New ExcelApplication()           
           Dim wb As Workbook = oExcelApp.Create(FileFormat.Xlsx) 
           Dim chartOne As Chart = WB[0].Charts[0]          
           chartOne.SaveImage("Path/filename.png"), System.Drawing.Imaging.ImageFormat.Png)