Message-ID: <954210881.8573.1711650563183.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8572_866614405.1711650563183" ------=_Part_8572_866614405.1711650563183 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Area.SaveImage(String, ImageFormat)

Area.SaveImage(String, ImageFormat)

Introduc= ed in build 9.1

Description

Saves an  Area as a specified image format at a spe= cified file path.=20
C#
=20
 public static void SaveImage(String filePath, =
ImageFormat imageFormat)
=20
=20
vb.net
=20
Public Static Sub SaveImage(ByVal filePath As St=
ring, ByVal imageFormat As ImageFormat)
=20

Parameters

=20
filePath
A=20 string representing the filepath you would like to save t= he image to.=20
ImageFormat
= The file format ExcelWriter will save the area as. Supported file types inc= lude GIF, JPEG, BMP, PNG, EMF, TIFF, and WMF

Exceptions

=20
System.Excep= tion
If there is a problem creating, opening, or writing to the file s= pecified, or reading from the Area object.=20

Examples

=20
C#
=20
           ExcelApplication xla =3D new ExcelApplication();
           Workbook WB=3D xla.Create(FileFormat.Xlsx);
           Area areaOne=3D WB[0].CreateArea["A1:C5"];         =20
           areaOne.SaveImage("Path/filename.png", System.Drawing.=
Imaging.ImageFormat.Png);            
=20
vb.net
=20
=09   Dim oExcelApp As New ExcelApplication()          =20
           Dim wb As Workbook =3D oExcelApp.Create(FileFormat.Xlsx)=20
           Dim areaOne As Area =3D WB[0].CreateArea["A1:C5"]     =
 =20
           areaOne.SaveImage("Path/filename.png"), System.Drawing=
.Imaging.ImageFormat.Png)                 
=20
------=_Part_8572_866614405.1711650563183--