Message-ID: <1847857860.9453.1711691477192.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9452_1301224123.1711691477192" ------=_Part_9452_1301224123.1711691477192 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Chartsheet

Chartsheet

Description

A=20 Chartsheet object represents a worksheet that contains only a = chart.=20
C#
=20
 public sealed class Chartsheet : Worksheet
=20
=20
vb.net
=20
Public NotInheritable Class Chartsheet
=09=09Inherits Worksheet
=20
=20

Remarks

=20

To create a Chartsheet, use Worksheets.createChartsheet() or= Chart.MoveChart(= ). To get an existing Chartsheet, get a Worksheet using Workbook.Worksheets[i] = and check if it is of type Chartsheet.

Anchors behave slig= htly differently on Chartsheets than on regular worksheets. When creating a= n anchor, the row and column properties are ignored. The OffsetX and Offset= Y properties specify a percentage value, with 0 corresponding to the left o= r top edge, and 100 corresponding to the bottom or right edge of the Charts= heet. This allows you to add a shape or picture to an arbitrary position on= the Chartsheet.

Similarly, the Width and Height properties on Shapes, Pictures, and Grou= ps specify a percentage of the total width or height of the chartsheet. So = a Shape with a width of 25 would occupy 25% of the Chartsheet.

You can have as many Shape, Pictures, and Groups as you wish on the char= tsheet. However, you may only have one chart on the chartsheet, which is sp= ecified with the Chart property.

Some Worksheet p= roperties are not valid on a Chartsheet.

 

The following table summarizes the behavior of Worksheet properties on C= hartsheets. If you try to access or set a property on a Chartsheet that is = not valid, an InvalidOperationException will be thrown. Some properties wil= l behave as AutoProperties, but will have no effect in the saved file. If t= he property is supported but there are differences in behavior from Workshe= ets, the differences are described in the Notes column.

3D"(error)" Property or method is not valid on Chartsheets, and will throw an I= nvalidOperationException
3D"(tick= Property or method is fully supported on C= hartsheets
3D"(warning)" Property behaves as an autoproperty, but will h= ave no effect on the resulting file.

Property

Valid on Chartsheet

Notes

Cells

3D=

Returns a Cells object, but using any methods or properties on the = object will throw an InvalidOperationException.

Charts

3D"(err=

 

Comments

3D"(err=

 

FirstShownColumn

3D=

 

FirstShownRow

3D=

 

FreezePanes

3D"(err=

 

GridlinesColor

3D=

 

Hyperlinks

3D"(err=

 

IsProtected

3D"(tick)=

 

IsSelected

3D"(tick)=

 

Name

3D"(tick)=

 

NamedRanges

3D=

Returns an empty enumeration

PageSetup

3D"(tick)=

Returns a ChartPageSetup object

Pictures

3D"(tick)=

 

PopulatedCells

3D"(err=

 

Position

3D"(tick)=

 

ProtectPasswordHash

3D"(tick)=

 

ShapeGroups

3D"(tick)=

 

Shapes

3D"(tick)=

 

ShowFormulas

3D=

 

ShowGridlines

3D=

 

ShowRowColHeaders

3D=

 

ShowZeroValues

3D=

 

StandardHeight

3D"(err=

 

StandardWidth

3D"(err=

 

StandardWidthInChars

3D"(err=

 

SummaryColumns

3D"(err=

 

SummaryRows

3D"(err=

 

TabColor

3D"(tick)=

 

Workbook

3D"(tick)=

 

ViewState

3D=

Returns SheetViewState.Normal. Setting it to = a different value with throw an InvalidOperationException.

Visibility

3D"(tick)=

 

ZoomPercentage

3D"(tick)=

Defaults to 120%

Method

Valid on Chartsheet

Notes

Item(Int32, Int32)

3D"(err=

 

Item(String)

3D"(err=

 

CopyPaste

3D"(err=

 

CreateAnchor

3D"(tick)=

The row and column properties will be ignored= . The offset properties should specify a percentage of the entire chartshee= t.

CreateArea

3D"(err=

 

CreateAreaOfColumns

3D"(err=

 

CreateAreaOfRows

3D"(err=

 

CreateNamedRange

3D"(err=

 

CreateRange

3D"(err=

 

DeleteColumn

3D"(err=

 

DeleteColumns

3D"(err=

 

DeleteRow

3D"(err=

 

DeleteRows

3D"(err=

 

GetColumnProperties

3D"(err=

 

GetNamedObject

3D"(err=

 

GetNamedRange

3D"(err=

 

GetRowProperties

3D"(err=

 

GroupColumns

3D"(err=

 

GroupRows

3D"(err=

 

ImportData

3D"(err=

 

InsertColumn

3D"(err=

 

InsertColumns

3D"(err=

 

InsertHorizontalPageBreak

3D"(err=

 

InsertRow

3D"(err=

 

InsertRows

3D"(err=

 

InsertVerticalPageBreak

3D"(err=

 

Protect

3D"(tick)=

 

Select

3D"(tick)=

 

UngroupColumns

3D"(err=

 

UngroupRows

3D"(err=

 

Unprotect

3D"(tick)=

 

=20

Examples

=20
C#
=20
          //--- Create a Chartsheet
          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Create();
          Worksheet ws =3D wb.Worksheets[0];
          Chartsheet cs =3D wb.Worksheets.CreateChartsheet
               (ChartType.Pie.Pie3D, "Chart");

          //--- Get the first Chartsheet from a Workbook
          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Open("C:\\MySpreadsheet.xls");
          bool found =3D false;
          for(int i =3D 0; i < wb.Worksheets.Count; i++)
          {
               if (found =3D=3D false)
               {
                    Worksheet ws =3D wb.Worksheets[i];
                   =20
                    if(ws is Chartsheet)
                    {
                         Chartsheet cs =3D (Chartsheet)ws;
                         found =3D true;
                    }
               }
          }
        
=20
vb.net
=20
          '--- Create a Chartsheet
          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Create()
          Dim ws As Worksheet =3D wb.Worksheets(0)
          Dim cs As Chartsheet =3D wb.Worksheets.CreateChartsheet _
               (ChartType.Pie.Pie3D, "Chart")

          '--- Get the first Chartsheet from a Workbook
          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Open("C:\MySpreadsheet.xls")
          Dim found As Boolean =3D False
          Dim i As Integer
          For i =3D 0 To wb.Worksheets.Count - 1
               If found =3D False Then
                    Dim ws As Worksheet =3D wb.Worksheets(i)

                    If ws Is Chartsheet Then
                         Dim cs As Chartsheet =3D CType(ws, Chartsheet)
                         found =3D True
                    End If
               End If
          Next
        
=20

Properties

Name

Description

Cha= rt

Returns a Chart object representing the chart in the chart sheet.
------=_Part_9452_1301224123.1711691477192 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Location: file:///C:/3d740d336624fb60720bc6ea766bbc3c iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABjklEQVQ4EWNkQAPcpkJp7Kp8Ltx6 gqHIUl8vvV/98/anPV9Pv5uFLM4I4zByMAmKpajsZpPhNoaJYaN/Pfl69tWcO67/f/x7D5IHGwDS LFmmfZeZi0UQmyZ0sb/f/rx/3nVVGWQIE0gSZDOxmkHqQWpBesBskJ95LETTQBx8gIedh4GNhY3h 199fYGXMfGxSfz/+es7M7ynVwSrMroRPs7qYGsPCkAlADzMznH92CaGUlYmTiRMY4ggRBgaQTcgA pHlD9DwGDVFVhjjDYGQpBpBecBggi8YYhjJ0ezWAhQJ1fBh2J65g4GbjYrjy8jqD/awAZKVgNgu6 SKF1KgMnCwdYOFzXD0wvvbieoXJHM7pSMB/DBeuubkfRXLe3B6dmkEJmNnluG+RA3HvnEMPNt/cY bBUsGAq21jGsvrQRbCA24jswZTKColEoWH4mNgWExN6tfZjOBErboORJSDG6PEgPSC84DEBpG5Q8 0RXh4oPUgvSA5MEGgNI0KG0T4xKQGlg+ABkAz40gDgiQmp0BQ16bzd1IdeoAAAAASUVORK5CYII= ------=_Part_9452_1301224123.1711691477192 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Location: file:///C:/f10cb6462c5e2e116f900924805cd156 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFklEQVQ4EWPkYWEW7NLVWGUhIujC QAI48eb9nrLLN8IYpxlq7yZVM8wekCGM51xt/sMEyKGZyNGErAfDAGYeHgbRwFAGEA0DILZcSSWK GEwOwwAhV08Gmcw8BpWeSWANIM0gtrCbFwNIDh2woAu8Xr+agVNZBawBpBEEuJRUGd7u2sYAkkMH GAaAFDzqaQerA9kKAiDNMDGwABKB4QWQHMjZnCqqSMpwMzEMgPkZ5uxv926DvQMKRGwAwwDpjFy4 n0HOvlOSxwAzBBQ76AAjIYFcwG9pw/Bu9w64WpAYyOCnMyYz/P3yBS4OYmAYgCJLBAfDC0ToQVHC BMoQKCIkcEB6mQ++ebdFk5fHWIaLU4kEvQyw7AwANERa0Te1fdYAAAAASUVORK5CYII= ------=_Part_9452_1301224123.1711691477192 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Location: file:///C:/73ca79bc86af4cb561603097fc5562ef iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAAAY1BMVEX/ ///ht0zds0vds0vds0vds0vds0vds0vbsUrZr0rZr0rZr0rXrUr/01H90VH7z1D5zVD3y0/1yk/z x0/wxE7swU7rwE3pvk3nvE3nu0zlukzjuUzftUvds0vZr0rXrUqBWzo+M1gKAAAAIXRSTlMAESJE VWZ3maq7zO7u//////////////////////////9zCPjNAAAACXBIWXMAAAsSAAALEgHS3X78AAAA HHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABR0RVh0Q3JlYXRpb24gVGlt ZQA2LzEvMTM4qUXQAAAAe0lEQVQYlV2N2RaDIAwFo6LWNhdsrV1wif//lUUownHeMmeSEHkqZkUZ BVvLZSZaMVi6NJf8BB6SlroFjul2BDJg29BL8xfXGbvAlws/K7kHoaUNwYQgMPqklj4Kve4JWxy8 XNKsBrGAcYm/EAXe7H7qtGI+Qool50Jnfgc2C3zDPO17AAAAAElFTkSuQmCC ------=_Part_9452_1301224123.1711691477192--