Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.7.1
ASP/COM Platform

View Docs for Another
Version or Platform

Programmer's Reference > ExcelApplication > Objects > Area

ExcelApplication is not
available in ExcelWriterSE.

The Area Object (SAArea)

The Area object represents the appearance of a chart area. ExcelWriter includes the following area objects:

Area Methods and Properties

Area Methods and Properties

AreaFormatting

Sets or retrieves the type of formatting applied to an Area object. The three types of formatting and their codes are,

saxlsCreationAutomatic0
saxlsCreationNone1
saxlsCreationCustom2

When AreaFormatting is set to saxlsCreationAutomatic (0), the default formatting settings will be applied to the Area object. SaxlsCreationCustom (2) enables custom formatting assigned to the Area object (colors or pattern). SaxlsCreationNone will remove all Area formatting (default or custom).

Signature:


[VBScript]
Property AreaFormatting As ASXCreationType (read/write)
			

The following sets the ChartArea's AreaFormatting to saxlsCreationNone, disabling all ChartArea formatting.

Example:


[VBScript]

'--- Create an instance of ExcelWriter and 
'--- create a new column chart
Dim XlwApp, WrkSht, MyChart
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart,0,2,2,10,20)

'--- The IChartFrame.Area property returns an SAArea object
'--- Remove chart area formatting by setting saxlsCreationNone
MyChart.CharArea.Area.AreaFormatting = saxlsCreationNone

Top

BackgroundColor

Sets or retrieves the background color of an Area object (Series Area, MarkerFormat, Wall3D, or ChartFrame Area).

Signature:


[VBScript]
Property BackgroundColor As Integer (read/write)

Example:


[VBScript]

'--- Create an instance of ExcelWriter and create 
'--- a new column chart
Dim XlwApp, WrkSht, MyChart
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart,0,2,2,10,20)

'--- Use an SAArea object to set the background 
'--- color of a chart
MyChart.CharArea.Area.BackgroundColor = RGB(255,123,100)

Top

ForegroundColor

Sets or retrieves the foreground color of an Area object (Series Area, MarkerFormat, Wall3D, or ChartFrame Area). Use RGB values to assign colors.

Signature:


[VBScript]
Property ForegroundColor As Integer (read/write)

Example:


[VBScript]

'--- Create an instance of ExcelWriter and 
'--- create a new column chart
Dim XlwApp, WrkSht, MyChart
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart,0,2,2,10,20)

'--- Use an SAArea object to set the foreground 
'--- color of a chart
MyChart.CharArea.Area.ForegroundColor = RGB(255,123,100)

Top

Pattern

Sets or retrieves the background pattern of an Area object (Series Area, MarkerFormat, Wall3D, or ChartFrame Area).

Signature:


[VBScript]
Property Pattern As SAXAreaPatternType (read/write)

ExcelWriter supports nineteen patterns, listed in the table below.

No Pattern0
0% Pattern1
50% Pattern2
70% Pattern3
25% Pattern4
Dark Horizontal5
Dark Vertical6
Dashed Downward Diagonal7
Dashed Upward Diagonal8
Small Checkerboard9
Trellis10
Light Horizontal11
Light Vertical12
Wide Downward diagonal13
Dark Upward diagonal14
Small Grid15
60% Pattern16
20% Pattern17
10% Pattern18

Example:


[VBScript]

'--- Create an instance of ExcelWriter and 
'--- create a new column chart
Dim XlwApp, WrkSht, MyChart
Set XlwApp = Server.CreateObject("SoftArtisans.ExcelWriter")
Set WrkSht = XlwApp.Worksheets(1)
Set MyChart = WrkSht.Charts.Add(saxlsColumnChart,0,2,2,10,20)

'--- Set the pattern for an SAArea object to 50%
MyChart.CharArea.Area.Pattern = 2

Top





Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.