DOCUMENTS 5 - PortalScripting API
|
The XLSXChartsheet class represents the Excel chartsheet. More...
Public Member Functions | |
String | getLastError () |
Function to get the description of the last error that occurred. More... | |
boolean | insertChart (XLSXChart chart) |
Insert a chart into the current chartsheet. More... | |
boolean | setFirstSheet () |
Set current chartsheet as the first visible sheet tab. More... | |
boolean | setFooter (String footer, number margin=0.3) |
Set the printed page footer caption. More... | |
boolean | setHeader (String header, number margin=0.3) |
Set the printed page header caption. More... | |
boolean | setLandscape () |
Set the page orientation as landscape. More... | |
boolean | setMargins (number left=-1, number right=-1, number top=-1, number bottom=-1) |
Set the worksheet margins for the printed page. More... | |
boolean | setPaperType (number type=0) |
Set the paper format for the printed output of the current chartsheet. More... | |
boolean | setPortrait () |
Set the page orientation as portrait. More... | |
boolean | setTabColor (number color) |
Set the color of the current chartsheet tab. More... | |
boolean | setZoom (number scale=100) |
Set the chartsheet zoom factor. More... | |
The XLSXChartsheet class represents the Excel chartsheet.
An Excel chartsheet is a type of worksheet that only contains a chart. An XLSXChartsheet object isn't created directly. Instead it is created by calling the XLSXWriter.addChartsheet(String name) function from an XLSXWriter object. A chartsheet functions as a worksheet and not as a chart. In order to have it display data a chart must be created and added to the chartsheet. The data for the chartsheet chart must be contained on a separate worksheet. That is why it is always created in conjunction with at least one data worksheet.
String XLSXChartsheet::getLastError | ( | ) |
Function to get the description of the last error that occurred.
boolean XLSXChartsheet::insertChart | ( | XLSXChart | chart | ) |
Insert a chart into the current chartsheet.
This function can be used to insert an XLSXChart object into the chartsheet. The XLSXChart object must be created first using the XLSXWriter.addChart(number type) function and configured using the functions from the class XLSXChart.
chart | An XLSXChart object created via XLSXWriter.addChart(number type). |
true
if successful, false
in case of any error boolean XLSXChartsheet::setFirstSheet | ( | ) |
Set current chartsheet as the first visible sheet tab.
The XLSXWriter.activateChartsheet(var chartsheet) function determines which chartsheet is initially selected. However, if there are a large number of chartsheets the selected chartsheet may not appear on the screen. To avoid this you can select the leftmost visible chartsheet tab using this function. The default value is the first chartsheet.
true
if successful, false
in case of any error boolean XLSXChartsheet::setFooter | ( | String | footer, |
number | margin = 0.3 |
||
) |
Set the printed page footer caption.
Footers are generated using a string which is a combination of plain text and control characters (see Generating header/footer for more details).
footer | The footer string. |
margin | Optional footer margin in inches. Excel default is 0.3. |
true
if successful, false
in case of any error boolean XLSXChartsheet::setHeader | ( | String | header, |
number | margin = 0.3 |
||
) |
Set the printed page header caption.
Headers are generated using a string which is a combination of plain text and control characters (see Generating header/footer for more details).
header | The header string. |
margin | Optional header margin in inches. Excel default is 0.3. |
true
if successful, false
in case of any error boolean XLSXChartsheet::setLandscape | ( | ) |
Set the page orientation as landscape.
This function is used to set the orientation of the chartsheet's printed page to landscape.
true
if successful, false
in case of any error boolean XLSXChartsheet::setMargins | ( | number | left = -1 , |
number | right = -1 , |
||
number | top = -1 , |
||
number | bottom = -1 |
||
) |
Set the worksheet margins for the printed page.
This function is used to set the margins of the chartsheet when it is printed. The units are in inches. Specifying -1 for any parameter will give the default Excel value as shown below.
left | Optional left margin in inches. Excel default is 0.7. |
right | Optional right margin in inches. Excel default is 0.7. |
top | Optional top margin in inches. Excel default is 0.75. |
bottom | Optional bottom margin in inches. Excel default is 0.75. |
true
if successful, false
in case of any error boolean XLSXChartsheet::setPaperType | ( | number | type = 0 | ) |
Set the paper format for the printed output of the current chartsheet.
type | Optional integer paper format type. If you do not specify a paper type the chartsheet will print using the printer's default paper style. See XLSXWorksheet.setPaperType(number type) for a full list of available paper sizes. |
true
if successful, false
in case of any error boolean XLSXChartsheet::setPortrait | ( | ) |
Set the page orientation as portrait.
This function is used to set the orientation of the chartsheet's printed page to portrait. The default chartsheet orientation is portrait, so this function isn't generally required.
true
if successful, false
in case of any error boolean XLSXChartsheet::setTabColor | ( | number | color | ) |
Set the color of the current chartsheet tab.
color | The desired tab color specified using a HTML style RGB integer value. |
true
if successful, false
in case of any error boolean XLSXChartsheet::setZoom | ( | number | scale = 100 | ) |
Set the chartsheet zoom factor.
scale | Optional integer chartsheet zoom factor in the range 10 <= zoom <= 400 . The default zoom factor is 100. |
true
if successful, false
in case of any error