Previous - xlsInsertImg Section Home - Microsoft Excel Next - xlsExportChart


xlsInsertChart ( )

Creates an Excel chart in a new worksheet

Usage:

xlsInsertChart (object me, integer chartType, integer x0, integer y0, integer x1, integer y1, integer plotBy, integer legendType, string title )

Parameters:

chartType (integer) - the Excel chart type. Some possible values are:

x0 (integer) - left cell index number for starting cell

y0 (integer) - top cell index number for starting cell

x1 (integer) - left cell index number for ending cell

y1 (integer) - top cell index number for ending cell

plotBy (integer) - 1 to plots the chart using the each row as the series. Any other integer value plots the series by column

legendType (integer). the placement of the legend box, and the possible values are

title (string) - the chart title string. To eliminate a title, pass in parameter of EMPTY.

Returns:

(integer) - The success code

Example:

xtRose = xtra("Rosetta").new( )
xtRose.xlsLaunch( )
xtRose.xlsNewBlank( )
xtRose.xlsSetRange( 1, 1, 2, 5 )
xtRose.xlsInsertTxt( [ ["socks", 20 ], ["gloves", 4 ], ["scarf", 2 ], ["glove", 10 ], ["ear muff", 1 ] ] )
xtRose.xlsInsertChart( 5, 1, 1, 2, 5 , 1, 4, "My winter collection" )

Notes:


Previous - xlsInsertImg Section Home - Microsoft Excel Next - xlsExportChart