Difference between revisions of "PptFile class"

From Catglobe Wiki
Jump to: navigation, search
 
(36 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
|Name=<nowiki>PptFile</nowiki>
 
|Name=<nowiki>PptFile</nowiki>
 
|Description=<nowiki>Manipulate PPT files.</nowiki>
 
|Description=<nowiki>Manipulate PPT files.</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Description=<nowiki>Create new presentation.</nowiki>}}
 
{{CGscriptConstructors_Template|Description=<nowiki>Create new presentation.</nowiki>}}
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
Line 11: Line 11:
 
|Description=<nowiki>Load existing presentation.</nowiki>}}
 
|Description=<nowiki>Load existing presentation.</nowiki>}}
 
|Methods=
 
|Methods=
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>AddSlide</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBox</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutType</nowiki>|Description=<nowiki>Layout type from the master slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=Image|Name=<nowiki>imageCGO</nowiki>|Description=<nowiki>An instance of ImageCGO</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>textBoxName</nowiki>|Description=<nowiki>Name of textbox is used to find the image position.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the n-th slide at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBox</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=Attachment|Name=<nowiki>attachmentCGO</nowiki>|Description=<nowiki>An instance of AttachmentCGO</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>textBoxName</nowiki>|Description=<nowiki>Name of textbox is used to find the image position.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the n-th slide at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBox</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>imageFileName</nowiki>|Description=<nowiki>Image file name on CatGlobe.File</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is temporary file</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>textBoxName</nowiki>|Description=<nowiki>Name of textbox is used to find the image position.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the n-th slide at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBoxInMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=Image|Name=<nowiki>imageCGO</nowiki>|Description=<nowiki>An instance of ImageCGO</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the master slide at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBoxInMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=Attachment|Name=<nowiki>attachmentCGO</nowiki>|Description=<nowiki>An instance of AttachmentCGO</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the master slide at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBoxInMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>imageFileName</nowiki>|Description=<nowiki>Image file name on CatGlobe.File</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is temporary file</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the master slide at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBoxInMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=Image|Name=<nowiki>imageCGO</nowiki>|Description=<nowiki>An instance of ImageCGO</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the particular master layout at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBoxInMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=Attachment|Name=<nowiki>attachmentCGO</nowiki>|Description=<nowiki>An instance of AttachmentCGO</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the particular master layout at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddImageToTextBoxInMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>imageFileName</nowiki>|Description=<nowiki>Image file name on CatGlobe.File</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is temporary file</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>horizontalAlignment</nowiki>|Description=<nowiki>Horizontal alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>verticalAlignment</nowiki>|Description=<nowiki>Vertical alignment</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleX</nowiki>|Description=<nowiki>Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>scaleY</nowiki>|Description=<nowiki>Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0</nowiki>}}
 +
|Description=<nowiki>Put the image specified by the existing resource id on the particular master layout at the designed location determined by the text box.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>AddSlide</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout name or type from the master slide.</nowiki>}}
 
|Description=<nowiki>Add a new blank slide based on the given master slide.</nowiki>}}
 
|Description=<nowiki>Add a new blank slide based on the given master slide.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Clear</nowiki>|Description=<nowiki>Remove all slides. Keep all master slides.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Clear</nowiki>|Description=<nowiki>Remove all slides. Keep all master slides.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>CloneSlide</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>CloneSlide</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=PptFile|Name=<nowiki>source</nowiki>|Description=<nowiki>Source of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide in the source.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>allowCloneMissingLayout</nowiki>|Description=<nowiki>Copy master slide from source or throw exception.</nowiki>}}
+
{{CGscriptParameters_Template|Type=PptFile|Name=<nowiki>source</nowiki>|Description=<nowiki>Source of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide in the source.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>localmastername</nowiki>|Description=<nowiki>Name of the masterslide in the current presentation.</nowiki>}}
 
|Description=<nowiki>Clone a slide from another presentation.</nowiki>}}
 
|Description=<nowiki>Clone a slide from another presentation.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>CloneSlide</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>CloneSlide</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=PptFile|Name=<nowiki>source</nowiki>|Description=<nowiki>Source of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of the slide in the source.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>allowCloneMissingLayout</nowiki>|Description=<nowiki>Copy master slide from source or throw exception.</nowiki>}}
+
{{CGscriptParameters_Template|Type=PptFile|Name=<nowiki>source</nowiki>|Description=<nowiki>Source of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of the slide in the source.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>localmastername</nowiki>|Description=<nowiki>Name of the masterslide in the current presentation.</nowiki>}}
 
|Description=<nowiki>Clone a slide from another presentation.</nowiki>}}
 
|Description=<nowiki>Clone a slide from another presentation.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>CloneSlideAndCloneMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=PptFile|Name=<nowiki>source</nowiki>|Description=<nowiki>Source of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide in the source.</nowiki>}}
 +
|Description=<nowiki>Clone a slide from another presentation along with its master slide.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>CloneSlideAndCloneMaster</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=PptFile|Name=<nowiki>source</nowiki>|Description=<nowiki>Source of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of the slide in the source.</nowiki>}}
 +
|Description=<nowiki>Clone a slide from another presentation along with its master slide.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyCell</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>originIdx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>originName</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originRowIdx</nowiki>|Description=<nowiki>Index of origin row.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originColIdx</nowiki>|Description=<nowiki>Index of origin col.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationIdx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>destinationName</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationRow</nowiki>|Description=<nowiki>Index of destination row. Use -1 to apply to whole col.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationCol</nowiki>|Description=<nowiki>Index of destination col. Use -1 to apply to whole row.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>preserveText</nowiki>|Description=<nowiki>Keep current text in the destination cell.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>preserveTextSimple</nowiki>|Description=<nowiki>If false preserve full text formatting.</nowiki>}}
 +
|Description=<nowiki>Copy cell (including formatting) to other cell(s).</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyDataPointFormat</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originSeries</nowiki>|Description=<nowiki>Index of origin series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originCategory</nowiki>|Description=<nowiki>Index of origin category.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationSeries</nowiki>|Description=<nowiki>Index of destination series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationCategory</nowiki>|Description=<nowiki>Index of destination category.</nowiki>}}
 +
|Description=<nowiki>Copy the formatting of a datapoint to another.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyDataPointFormat</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>originIdx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>originName</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originSeries</nowiki>|Description=<nowiki>Index of origin series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originCategory</nowiki>|Description=<nowiki>Index of origin category.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationIdx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationSeries</nowiki>|Description=<nowiki>Index of destination series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationCategory</nowiki>|Description=<nowiki>Index of destination category.</nowiki>}}
 +
|Description=<nowiki>Copy the formatting of a datapoint from another chart to another.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>CurrentLayoutType</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>CurrentLayoutType</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
 
|Description=<nowiki>Get the current layout type.</nowiki>}}
 
|Description=<nowiki>Get the current layout type.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>CurrentMasterName</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>CurrentMasterName</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
 
|Description=<nowiki>Get the current master.</nowiki>}}
 
|Description=<nowiki>Get the current master.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllDiagrams</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllDiagrams</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
 
|Description=<nowiki>Return a list of diagram names that can be used in SetDiagram and other diagram functions.</nowiki>}}
 
|Description=<nowiki>Return a list of diagram names that can be used in SetDiagram and other diagram functions.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllMasterTextBoxes</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllMasterTextBoxes</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>}}
 
|Description=<nowiki>Return a list of text box names that can be used in SetText for the given slide.</nowiki>}}
 
|Description=<nowiki>Return a list of text box names that can be used in SetText for the given slide.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllTables</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllTables</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
 
|Description=<nowiki>Return a list of table names that can be used in SetDiagram and other diagram functions.</nowiki>}}
 
|Description=<nowiki>Return a list of table names that can be used in SetDiagram and other diagram functions.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllTextBoxes</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllTextBoxes</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
 
|Description=<nowiki>Return a list of text box names that can be used in SetText for the given slide.</nowiki>}}
 
|Description=<nowiki>Return a list of text box names that can be used in SetText for the given slide.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetDiagramData</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>}}
 +
|Description=<nowiki>Get the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetLayoutTypesFromMaster</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetLayoutTypesFromMaster</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of master.</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of master.</nowiki>}}
 
|Description=<nowiki>Get a list of all the layout types that belongs to a given master slide.</nowiki>}}
 
|Description=<nowiki>Get a list of all the layout types that belongs to a given master slide.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetMasterNames</nowiki>|Description=<nowiki>Get a list of all the master slide names. The first is also the primary.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetMasterNames</nowiki>|Description=<nowiki>Get a list of all the master slide names. The first is also the primary.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetMasterSlideIdxByName</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GetMasterSlideIdxByName</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of slide to find.</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of slide to find.</nowiki>}}
 
|Description=<nowiki>Find a slide based on the name. Return -1 if not found.</nowiki>}}
 
|Description=<nowiki>Find a slide based on the name. Return -1 if not found.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetMasterTextFields</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GetMasterTextFields</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>}}
 
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name.</nowiki>}}
 
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetSlideIdxByName</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GetSlideIdxByName</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of slide to find.</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of slide to find.</nowiki>}}
 
|Description=<nowiki>Find a slide based on the name. Return -1 if not found.</nowiki>}}
 
|Description=<nowiki>Find a slide based on the name. Return -1 if not found.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetTextFields</nowiki>|Parameters=
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GetTextFields</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>}}
 
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name.</nowiki>}}
 
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>InsertEmptySlide</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>positionToInsert</nowiki>|Description=<nowiki>position to insert the new slide</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>slideIndexToCopyLayout</nowiki>|Description=<nowiki>the slide index to copy its layout</nowiki>}}
 +
|Description=<nowiki>Insert an empty slide at the specified position with the layout copied from an existing slide in the presentation</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>MoveSlideToPosition</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>originSlideIdx</nowiki>|Description=<nowiki>Index of slide to move.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>newSlideIdx</nowiki>|Description=<nowiki>Put at this index.</nowiki>}}
 +
|Description=<nowiki>Move an existing slide to another position in the presentation.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>Name</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>Name</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>}}
 
|Description=<nowiki>Get the name of the given slide.</nowiki>}}
 
|Description=<nowiki>Get the name of the given slide.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>NumberOfSlides</nowiki>|Description=<nowiki>Get the number of slides.</nowiki>}}
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>NumberOfSlides</nowiki>|Description=<nowiki>Get the number of slides.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>RemoveSlide</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>RemoveSlide</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide to remove.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide to remove.</nowiki>}}
 
|Description=<nowiki>Remove the given slide. All indexes of following slides are adjusted.</nowiki>}}
 
|Description=<nowiki>Remove the given slide. All indexes of following slides are adjusted.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>RenderSlideAsPng</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>RenderSlideAsPng</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide to render.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>dest</nowiki>|Description=<nowiki>Save to this file.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is destination a temporary file.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide to render.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>dest</nowiki>|Description=<nowiki>Save to this file.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is destination a temporary file.</nowiki>}}
 
|Description=<nowiki>Render a slide as png image.</nowiki>}}
 
|Description=<nowiki>Render a slide as png image.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>RenderSlideAsSvg</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>RenderSlideAsSvg</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide to render.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide to render.</nowiki>}}
 
|Description=<nowiki>Render a slide as svg image.</nowiki>}}
 
|Description=<nowiki>Render a slide as svg image.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SaveAll</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>dest</nowiki>|Description=<nowiki>Save to this file.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is destination a temporary file.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>saveFormatType</nowiki>|Description=<nowiki>File Format To Save.</nowiki>}}
 +
|Description=<nowiki>Save presentation accordingly to specified format.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SaveAllAsPptx</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SaveAllAsPptx</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>dest</nowiki>|Description=<nowiki>Save to this file.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is destination a temporary file.</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>dest</nowiki>|Description=<nowiki>Save to this file.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>isTemp</nowiki>|Description=<nowiki>Is destination a temporary file.</nowiki>}}
 
|Description=<nowiki>Save presentation.</nowiki>}}
 
|Description=<nowiki>Save presentation.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetBubbleDiagramData</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table, as {'XValue', 'YValue', 'bubbleSize'}. E.g. {{5, 10, 20}, {2, 4, 6}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 +
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetDataPointGradientColor</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>seriesIdx</nowiki>|Description=<nowiki>Index of series. Notice bubble chart only has 1 series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>dataPointIdx</nowiki>|Description=<nowiki>Index of point in serie.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>gradientStops</nowiki>|Description=<nowiki>Array of position, color. See Color_fromAny.</nowiki>}}
 +
|Description=<nowiki>Set the color of a specific data point in a chart.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetDataPointSolidColor</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>seriesIdx</nowiki>|Description=<nowiki>Index of series. Notice bubble chart only has 1 series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>dataPointIdx</nowiki>|Description=<nowiki>Index of point in serie.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>color</nowiki>|Description=<nowiki>See Color_fromAny.</nowiki>}}
 +
|Description=<nowiki>Set the color of a specific data point in a chart.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetDiagram</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetDiagram</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>diagramIndex</nowiki>|Description=<nowiki>Data for the table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>diagramIndex</nowiki>|Description=<nowiki>Data for the table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.</nowiki>}}
 
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetDiagramData</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetDiagramData</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 +
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetFunnelDiagramData</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the funnel diagram. E.g. {{'Cat01', 'Cat02', 'Cat03'}, {5, 10, 20}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 +
|Description=<nowiki>Set the values of the funnel diagram with the given name on the given slide to the values given.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetHorizontalAxisMinMaxValues</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>maxValue</nowiki>|Description=<nowiki>Maximum value.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>minValue</nowiki>|Description=<nowiki>Minimum value.</nowiki>}}
 +
|Description=<nowiki>Set the minimum and maximum values of the horizontal axis of the diagram with the given name on the given slide to the values given.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetMapChartData</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>geodata</nowiki>|Description=<nowiki>Geo data for the table that helps Excel figure out what part of the map to highlight. E.g. {{'Province', 'County'}, {'Northern Ireland', 'Antrim'}, ...} or {{'Kommune'}, {'Glostrup'}, ...}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the series. E.g. {{'Series1'}, {10}, {4}, {7}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetMasterAndLayout</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetMasterAndLayout</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>}}
 
|Description=<nowiki>Set the layout on the given slide to the layout from the given master.</nowiki>}}
 
|Description=<nowiki>Set the layout on the given slide to the layout from the given master.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetMasterText</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetMasterText</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>parameters</nowiki>|Description=<nowiki>Parameters for the text box.</nowiki>}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>parameters</nowiki>|Description=<nowiki>Parameters for the text box.</nowiki>}}
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.</nowiki>}}
+
|Description=<nowiki>Set parameters needed to format the fields in the text box with the given name on a specific layout of the master slide. Return resulting plain text value.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetMasterText</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>parameters</nowiki>|Description=<nowiki>Parameters for the text box.</nowiki>}}
 +
|Description=<nowiki>Set parameters needed to format the fields in the text box with the given name on a specific master slide. Return resulting plain text value.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetScatterDiagramData</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table. E.g. {{'XValue', 'YValue-1', 'YValue-2'}, {5, 10, 20}, {2, 4, 6}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 +
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetScatterDiagramData</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table. E.g. {{'XValue', 'YValue-1', 'YValue-2'}, {5, 10, 20}, {2, 4, 6}}</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>dataLabels</nowiki>|Description=<nowiki>Label of data.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>chartTitle</nowiki>|Description=<nowiki>Title of the chart.</nowiki>}}
 +
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTable</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTable</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>diagramIndex</nowiki>|Description=<nowiki>Data for the table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableWidth</nowiki>|Description=<nowiki>If true, the columnsare split into minor cols. This will keep the width of the table.
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>diagramIndex</nowiki>|Description=<nowiki>Data for the table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableWidth</nowiki>|Description=<nowiki>If true, the columnsare split into minor cols. This will keep the width of the table.
 
If false the columns are cloned, which will keep the size of cols, but table may then exceed the slide width.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableHeight</nowiki>|Description=<nowiki>If true, the rows are split into minor rows. This will keep the height of the table.
 
If false the columns are cloned, which will keep the size of cols, but table may then exceed the slide width.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableHeight</nowiki>|Description=<nowiki>If true, the rows are split into minor rows. This will keep the height of the table.
 
If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.</nowiki>}}
 
If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.</nowiki>}}
 
|Description=<nowiki>Set the values of the table with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.</nowiki>}}
 
|Description=<nowiki>Set the values of the table with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableBackgroundColor</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>coloredCells</nowiki>|Description=<nowiki>Color of cells See Color_fromAny</nowiki>}}
 +
|Description=<nowiki>Set background color for all cells in the table using array of colors.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableBackgroundColorByHexString</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>coloredCells</nowiki>|Description=<nowiki>See SetTableBackgroundColor</nowiki>}}
 +
|Obsolete=1
 +
|Description=<nowiki>[Obsolete] Same as SetTableBackgroundColor.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableBackgroundColorByRGB</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>coloredCells</nowiki>|Description=<nowiki>See SetTableBackgroundColor</nowiki>}}
 +
|Obsolete=1
 +
|Description=<nowiki>[Obsolete] Same as SetTableBackgroundColor.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableBackgroundColorPartially</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>coloredCells</nowiki>|Description=<nowiki>List of array objects in which describes the cell row, column and color specified by color (See Color_fromAny). E.g. {{1, 2, {255,0,0}}, {4, 5, new Color({255,0,0})}, {4, 5, "#FF0000"}}</nowiki>}}
 +
|Description=<nowiki>Set background color of some of cells in the table using array of colors.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableBackgroundColorPartiallyByHexString</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>coloredCells</nowiki>|Description=<nowiki>See SetTableBackgroundColorPartially</nowiki>}}
 +
|Obsolete=1
 +
|Description=<nowiki>[Obsolete] Same as SetTableBackgroundColorPartially.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableBackgroundColorPartiallyByRGB</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>coloredCells</nowiki>|Description=<nowiki>See SetTableBackgroundColorPartially</nowiki>}}
 +
|Obsolete=1
 +
|Description=<nowiki>[Obsolete] Same as SetTableBackgroundColorPartially.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableData</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTableData</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableWidth</nowiki>|Description=<nowiki>If true, the last col is split into minor cols. This will keep the width of the table.
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of table.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>data</nowiki>|Description=<nowiki>Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableWidth</nowiki>|Description=<nowiki>If true, the last col is split into minor cols. This will keep the width of the table.
 
If false the last col is cloned, which will keep the size of cols, but table may then exceed the slide width.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableHeight</nowiki>|Description=<nowiki>If true, the last row is split into minor rows. This will keep the height of the table.
 
If false the last col is cloned, which will keep the size of cols, but table may then exceed the slide width.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>keepTableHeight</nowiki>|Description=<nowiki>If true, the last row is split into minor rows. This will keep the height of the table.
 
If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.</nowiki>}}
 
If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.</nowiki>}}
 
|Description=<nowiki>Set the values of the table with the given name on the given slide to the values given.</nowiki>}}
 
|Description=<nowiki>Set the values of the table with the given name on the given slide to the values given.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetText</nowiki>|Parameters=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetText</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>parameters</nowiki>|Description=<nowiki>Parameters for the text box.</nowiki>}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>parameters</nowiki>|Description=<nowiki>Parameters for the text box.</nowiki>}}
 
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.</nowiki>}}
 
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetVerticalAxisMinMaxValues</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>maxValue</nowiki>|Description=<nowiki>Maximum value.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=number|Name=<nowiki>minValue</nowiki>|Description=<nowiki>Minimum value.</nowiki>}}
 +
|Description=<nowiki>Set the minimum and maximum values of the vertical axis of the diagram with the given name on the given slide to the values given.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SwapDataPointFormat</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of diagram.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originSeries</nowiki>|Description=<nowiki>Index of origin series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>originCategory</nowiki>|Description=<nowiki>Index of origin category.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationSeries</nowiki>|Description=<nowiki>Index of destination series.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destinationCategory</nowiki>|Description=<nowiki>Index of destination category.</nowiki>}}
 +
|Description=<nowiki>Swap the formatting of two datapoints.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 +
 +
=== <span style="color:#DF8621">'''Related method'''</span> ===
 +
{{CGscriptMethods_Template|ReturnType=Color|Name=<nowiki>Color_fromAny</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=object|Name=<nowiki>color</nowiki>|Description=<nowiki>Object to convert to color</nowiki>}}
 +
|InClass=<nowiki>Color</nowiki>
 +
|Description=<nowiki>Create new color object from anything that can be converted, E.g. {255,0,0}, {255,0,0,32}, "pink", "#FF0000", new Color("pink", false)</nowiki>}}
 +
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
 +
<span style="color:#DF8621">Example for using SetMapChartData</span>
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(18953591));
 +
array geodata = {{"Region"},{"Hovedstaden"},{"Midtjylland"},{"Nordjylland"},{"Sjælland"},{"Syddanmark"}};
 +
array data = {{"Data"}, {0.4}, {0.10},{0.2},{0.1},{0.2}};
 +
ppt.SetMapChartData(1, "Diagram1", geodata, data,"");
 +
ppt.SaveAllAsPptx("test.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));
 +
</source>
 +
 +
<span style="color:#DF8621">Example for using SetScatterDiagramData</span>
 +
<source lang="javascript">
 +
//Create ppt file with an Attachment
 +
number pptLayoutTemplateRid = 15562782;
 +
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
 +
PptFile ppt = new PptFile(pptLayoutTemplateFile);
 +
//scatterdata for slide 0
 +
number slideIndex = 0;
 +
string diagramName =  "Content Placeholder 7";
 +
array scatterdata = {{"x-values", "y value 1", "y value 2"},{1,5,3}, {2,6,2},{3,10,11},{4,15,16}};
 +
string chartTitle= "Check scatterdata";
 +
ppt.SetScatterDiagramData( slideIndex, diagramName, scatterdata, chartTitle);
 +
//Save to pptx file
 +
string pptDownloadName = "test.pptx";
 +
bool isTemp = false;
 +
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
 +
//print link to download the ppts file
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
 +
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx
 +
</source>
 +
 +
<span style="color:#DF8621">Example for using AddImageToTextBox</span>
 +
<source lang="javascript">
 +
//Create ppt file with an Attachment
 +
number pptLayoutTemplateRid = 15596830;
 +
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
 +
PptFile ppt = new PptFile(pptLayoutTemplateFile);
 +
//AddImageToTextBox
 +
number imageAttachmentRId = 15596380;
 +
Attachment imageAttachment = new Attachment(imageAttachmentRId);
 +
number idx = 0;
 +
string textBoxName = "TextBox 2";
 +
number horizontalAlignment=0;//Left, Center, Right [-1, 1]
 +
number verticalAlignment=0;//Top, Middle, Bottom  [-1, 1]
 +
number scaleX = 0;
 +
number scaleY = 0;
 +
ppt.AddImageToTextBox(imageAttachment, idx, textBoxName, horizontalAlignment, verticalAlignment, scaleX, scaleY);
 +
//Save to pptx file
 +
string pptDownloadName = "test.pptx";
 +
bool isTemp = false;
 +
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
 +
//print link to download the ppts file
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
 +
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx
 +
</source>
 +
 +
<span style="color:#DF8621">Example for using AddImageToTextBoxInMaster</span>
 +
<source lang="javascript">
 +
//Create ppt file with an Attachment
 +
number pptLayoutTemplateRid = 15596830;
 +
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
 +
PptFile ppt = new PptFile(pptLayoutTemplateFile);
 +
//AddImageToTextBox
 +
Image im = new Image(15597063);
 +
string masterName = "Master 1";
 +
string textBoxName = "TextBox 2";
 +
number horizontalAlignment=1;//Left, Center, Right [-1, 1]
 +
number verticalAlignment=1;//Top, Middle, Bottom  [-1, 1]
 +
number scaleX = 0;
 +
number scaleY = 0;
 +
ppt.AddImageToTextBoxInMaster(im, masterName, textBoxName, horizontalAlignment, verticalAlignment, scaleX, scaleY);
 +
//Save to pptx file
 +
string pptDownloadName = "test.pptx";
 +
bool isTemp = false;
 +
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
 +
//print link to download the ppts file
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
 +
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx
 +
</source>
 +
 +
<span style="color:#DF8621">Example for CopyCell</span>
 +
<source lang="javascript">
 +
number pptLayoutTemplateRid = 15599667;
 +
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
 +
PptFile ppt = new PptFile(pptLayoutTemplateFile);
 +
//CopyCell
 +
number originIdx = 0;//"Index of slide."
 +
string originName = "Table1";//"Name of table."
 +
number originRowIdx = 0;//"Index of origin row."
 +
number originColIdx = 0;//"Index of origin col."
 +
number destinationIdx = 0;//"Index of slide."
 +
string destinationName = "Table2";//"Name of table."
 +
number destinationRow = 0;//"Index of destination row. Use -1 to apply to whole col."
 +
number destinationCol = 0;//"Index of destination col. Use -1 to apply to whole row."
 +
bool preserveText = false;//"Keep current text in the destination cell."
 +
bool preserveTextSimple = false;//"If false preserve full text formatting."
 +
ppt.CopyCell(originIdx, originName, originRowIdx, originColIdx, destinationIdx, destinationName, destinationRow, destinationCol, preserveText, preserveTextSimple);
 +
//Save to pptx file
 +
string pptDownloadName = "test.pptx";
 +
bool isTemp = false;
 +
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
 +
//print link to download the ppts file
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
 +
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx
 +
</source>
 +
[[File:2018-05-09_16-37-26.png]]
 +
 +
<span style="color:#DF8621">Example for: CopyDataPointFormat</span>
 +
<source lang="javascript">
 +
//Create ppt file with an Attachment
 +
number pptLayoutTemplateRid = 15639264;
 +
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
 +
PptFile ppt = new PptFile(pptLayoutTemplateFile);
 +
//CopyDataPointFormat
 +
number originidx = 0;
 +
string originname = "Chart";
 +
number originSeries = 0;
 +
number originCategory = 4;
 +
 +
number idx =0;
 +
string name = "Chart";
 +
number destinationSeries = 0;
 +
number destinationCategory = 2;
 +
 +
ppt.CopyDataPointFormat(originidx, originname, originSeries, originCategory, idx, name, destinationSeries, destinationCategory);
 +
//Save to pptx file
 +
string pptDownloadName = "test.pptx";
 +
bool isTemp = false;
 +
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
 +
//print link to download the ppts file
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
 +
 +
</source>
 +
<span style="color:#DF8621">Example for: SetText</span>
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(16751392));
 +
ppt.SetText(0,"Textbox1",{"consumption habits", 300, 60, 40});
 +
ppt.SaveAllAsPptx("test.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));
 +
</source>
 +
Text setup on template file (text fields follow .net style formatting codes. Ex: {0:0.0},{0:P1}):
 +
 +
[[File:2021-06-14_14-52-29.png]]
 +
 +
Result after run script:
 +
 +
[[File:2021-06-14_14-53-08.png]]
 +
 +
<span style="color:#DF8621">Example for SetTableBackgroundColor</span>
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(15923133));
 +
array tableColor ={
 +
{},//Row1: using color from template
 +
{"",{},"yellow","#FFFF00",{255,255,0},Color_fromAny("yellow")},//Row2
 +
    //Row2: col1,2 using color from template; col3,4,5,6 set color yellow, col7++ not set (using color from template)
 +
//Row3++ not set (using color from template)
 +
};
 +
ppt.SetTableBackgroundColor(3, "table1", tableColor);
 +
ppt.SaveAllAsPptx("testTableColor.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("testTableColor.pptx", false));
 +
</source>
 +
<span style="color:#DF8621">Example for: SetTableBackgroundColorPartially</span>
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(15923133));
 +
array tableColor ={
 +
{0,0,"Yellow"} //{row1,col1,colorYellow}
 +
{0,1,"#FFFF00"}, //{row1,col2,colorYellow}
 +
{1,0,{255,255,0}}, //{row2,col1,colorYellow}
 +
{1,2,Color_fromAny("yellow")} //{row2,col3,colorYellow}
 +
};
 +
ppt.SetTableBackgroundColorPartially(3, "table1", tableColor);
 +
ppt.SaveAllAsPptx("testTableColor.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("testTableColor.pptx", false));
 +
</source>
 +
<span style="color:#DF8621">Example for: SetBubbleDiagramData</span>
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(15923121));
 +
array bubbleData = {{3,5,.3}, {2,7,1}, {4,7,2}};// {XValue, YValue, bubbleSize}
 +
ppt.SetBubbleDiagramData(1, "chart1", bubbleData, "");
 +
ppt.SaveAllAsPptx("test.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));
 +
</source>
 +
 +
<span style="color:#DF8621">Example for: SetDataPointSolidColor</span>
 +
 +
[[File:2021-05-24_14-16-05.jpg|500px]]
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(15923121));
 +
number seriesIdx = 0;
 +
number dataPointIdx = 0;
 +
Color dataPointColor = Color_fromAny ("red");
 +
ppt.SetDataPointSolidColor(1, "Chart1", seriesIdx, dataPointIdx, dataPointColor);
 +
ppt.SaveAllAsPptx("test.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));
 +
</source>
 +
 +
<span style="color:#DF8621">Example for: SetDataPointGradientColor</span>
 +
 +
[[File:2021-05-24_14-29-45.jpg|500px]]
 +
<source lang="javascript">
 +
PptFile ppt = new PptFile(new Attachment(15923121));
 +
number seriesIdx = 0;
 +
number dataPointIdx = 0;
 +
array gradientStops = {{0.1, "red"},{0.9, "black"}};
 +
ppt.SetDataPointGradientColor(1, "Chart1", seriesIdx, dataPointIdx, gradientStops);
 +
ppt.SaveAllAsPptx("test.pptx", false);
 +
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));
 +
</source>

Latest revision as of 03:55, 14 March 2023

PptFile



Manipulate PPT files.

Parent class

Inherits from object

Constructors

  • () - Create new presentation.
  • (Attachment attachment "Load from this attachment.") - Load existing presentation.
  • (string source "Load from this source.", bool isTemp "Is source a temporary file.") - Load existing presentation.

Methods

  • Empty AddImageToTextBox(Image imageCGO "An instance of ImageCGO", int idx "Index of slide.", string textBoxName "Name of textbox is used to find the image position.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the n-th slide at the designed location determined by the text box.
  • Empty AddImageToTextBox(Attachment attachmentCGO "An instance of AttachmentCGO", int idx "Index of slide.", string textBoxName "Name of textbox is used to find the image position.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the n-th slide at the designed location determined by the text box.
  • Empty AddImageToTextBox(string imageFileName "Image file name on CatGlobe.File", bool isTemp "Is temporary file", int idx "Index of slide.", string textBoxName "Name of textbox is used to find the image position.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the n-th slide at the designed location determined by the text box.
  • Empty AddImageToTextBoxInMaster(Image imageCGO "An instance of ImageCGO", string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the master slide at the designed location determined by the text box.
  • Empty AddImageToTextBoxInMaster(Attachment attachmentCGO "An instance of AttachmentCGO", string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the master slide at the designed location determined by the text box.
  • Empty AddImageToTextBoxInMaster(string imageFileName "Image file name on CatGlobe.File", bool isTemp "Is temporary file", string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the master slide at the designed location determined by the text box.
  • Empty AddImageToTextBoxInMaster(Image imageCGO "An instance of ImageCGO", string mastername "Name of the masterslide.", string name "Name of text box.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the particular master layout at the designed location determined by the text box.
  • Empty AddImageToTextBoxInMaster(Attachment attachmentCGO "An instance of AttachmentCGO", string mastername "Name of the masterslide.", string name "Name of text box.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the particular master layout at the designed location determined by the text box.
  • Empty AddImageToTextBoxInMaster(string imageFileName "Image file name on CatGlobe.File", bool isTemp "Is temporary file", string mastername "Name of the masterslide.", string name "Name of text box.", int horizontalAlignment "Horizontal alignment", int verticalAlignment "Vertical alignment", number scaleX "Ratio is used to resize the image width. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0", number scaleY "Ratio is used to resize the image heigh. Scale up if ratio > 1, otherwise scale down and No scale when ratio <= 0") - Put the image specified by the existing resource id on the particular master layout at the designed location determined by the text box.
  • int AddSlide(string mastername "Name of the masterslide.", string layoutNameOrType "Layout name or type from the master slide.") - Add a new blank slide based on the given master slide.
  • Empty Clear() - Remove all slides. Keep all master slides.
  • int CloneSlide(PptFile source "Source of slide.", int idx "Index of slide in the source.", string localmastername "Name of the masterslide in the current presentation.") - Clone a slide from another presentation.
  • int CloneSlide(PptFile source "Source of slide.", string name "Name of the slide in the source.", string localmastername "Name of the masterslide in the current presentation.") - Clone a slide from another presentation.
  • int CloneSlideAndCloneMaster(PptFile source "Source of slide.", int idx "Index of slide in the source.") - Clone a slide from another presentation along with its master slide.
  • int CloneSlideAndCloneMaster(PptFile source "Source of slide.", string name "Name of the slide in the source.") - Clone a slide from another presentation along with its master slide.
  • Empty CopyCell(int originIdx "Index of slide.", string originName "Name of table.", int originRowIdx "Index of origin row.", int originColIdx "Index of origin col.", int destinationIdx "Index of slide.", string destinationName "Name of table.", int destinationRow "Index of destination row. Use -1 to apply to whole col.", int destinationCol "Index of destination col. Use -1 to apply to whole row.", bool preserveText "Keep current text in the destination cell.", bool preserveTextSimple "If false preserve full text formatting.") - Copy cell (including formatting) to other cell(s).
  • Empty CopyDataPointFormat(int idx "Index of slide.", string name "Name of diagram.", int originSeries "Index of origin series.", int originCategory "Index of origin category.", int destinationSeries "Index of destination series.", int destinationCategory "Index of destination category.") - Copy the formatting of a datapoint to another.
  • Empty CopyDataPointFormat(int originIdx "Index of slide.", string originName "Name of diagram.", int originSeries "Index of origin series.", int originCategory "Index of origin category.", int destinationIdx "Index of slide.", string name "Name of diagram.", int destinationSeries "Index of destination series.", int destinationCategory "Index of destination category.") - Copy the formatting of a datapoint from another chart to another.
  • string CurrentLayoutType(int idx "Index of slide.") - Get the current layout type.
  • string CurrentMasterName(int idx "Index of slide.") - Get the current master.
  • array GetAllDiagrams(int idx "Index of slide.") - Return a list of diagram names that can be used in SetDiagram and other diagram functions.
  • array GetAllMasterTextBoxes(string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.") - Return a list of text box names that can be used in SetText for the given slide.
  • array GetAllTables(int idx "Index of slide.") - Return a list of table names that can be used in SetDiagram and other diagram functions.
  • array GetAllTextBoxes(int idx "Index of slide.") - Return a list of text box names that can be used in SetText for the given slide.
  • array GetDiagramData(int idx "Index of slide.", string name "Name of diagram.") - Get the values of the diagram with the given name on the given slide to the values given.
  • array GetLayoutTypesFromMaster(string name "Name of master.") - Get a list of all the layout types that belongs to a given master slide.
  • array GetMasterNames() - Get a list of all the master slide names. The first is also the primary.
  • int GetMasterSlideIdxByName(string name "Name of slide to find.") - Find a slide based on the name. Return -1 if not found.
  • int GetMasterTextFields(string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.") - Get the number of parameters needed to format the fields in the text box with the given name.
  • int GetSlideIdxByName(string name "Name of slide to find.") - Find a slide based on the name. Return -1 if not found.
  • int GetTextFields(int idx "Index of slide.", string name "Name of text box.") - Get the number of parameters needed to format the fields in the text box with the given name.
  • Empty InsertEmptySlide(int positionToInsert "position to insert the new slide", int slideIndexToCopyLayout "the slide index to copy its layout") - Insert an empty slide at the specified position with the layout copied from an existing slide in the presentation
  • Empty MoveSlideToPosition(int originSlideIdx "Index of slide to move.", int newSlideIdx "Put at this index.") - Move an existing slide to another position in the presentation.
  • string Name(int idx "Index of slide.") - Get the name of the given slide.
  • int NumberOfSlides() - Get the number of slides.
  • Empty RemoveSlide(int idx "Index of slide to remove.") - Remove the given slide. All indexes of following slides are adjusted.
  • Empty RenderSlideAsPng(int idx "Index of slide to render.", string dest "Save to this file.", bool isTemp "Is destination a temporary file.") - Render a slide as png image.
  • string RenderSlideAsSvg(int idx "Index of slide to render.") - Render a slide as svg image.
  • Empty SaveAll(string dest "Save to this file.", bool isTemp "Is destination a temporary file.", int saveFormatType "File Format To Save.") - Save presentation accordingly to specified format.
  • Empty SaveAllAsPptx(string dest "Save to this file.", bool isTemp "Is destination a temporary file.") - Save presentation.
  • Empty SetBubbleDiagramData(int idx "Index of slide.", string name "Name of diagram.", array data "Data for the table, as {'XValue', 'YValue', 'bubbleSize'}. E.g. {{5, 10, 20}, {2, 4, 6}}", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
  • Empty SetDataPointGradientColor(int idx "Index of slide.", string name "Name of diagram.", int seriesIdx "Index of series. Notice bubble chart only has 1 series.", int dataPointIdx "Index of point in serie.", array gradientStops "Array of position, color. See Color_fromAny.") - Set the color of a specific data point in a chart.
  • Empty SetDataPointSolidColor(int idx "Index of slide.", string name "Name of diagram.", int seriesIdx "Index of series. Notice bubble chart only has 1 series.", int dataPointIdx "Index of point in serie.", object color "See Color_fromAny.") - Set the color of a specific data point in a chart.
  • Empty SetDiagram(int idx "Index of slide.", string name "Name of diagram.", int diagramIndex "Data for the table.", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.
  • Empty SetDiagramData(int idx "Index of slide.", string name "Name of diagram.", array data "Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
  • Empty SetFunnelDiagramData(int idx "Index of slide.", string name "Name of diagram.", array data "Data for the funnel diagram. E.g. {{'Cat01', 'Cat02', 'Cat03'}, {5, 10, 20}}", string chartTitle "Title of the chart.") - Set the values of the funnel diagram with the given name on the given slide to the values given.
  • Empty SetHorizontalAxisMinMaxValues(int idx "Index of slide.", string name "Name of diagram.", number maxValue "Maximum value.", number minValue "Minimum value.") - Set the minimum and maximum values of the horizontal axis of the diagram with the given name on the given slide to the values given.
  • Empty SetMapChartData(int idx "Index of slide.", string name "Name of diagram.", array geodata "Geo data for the table that helps Excel figure out what part of the map to highlight. E.g. {{'Province', 'County'}, {'Northern Ireland', 'Antrim'}, ...} or {{'Kommune'}, {'Glostrup'}, ...}", array data "Data for the series. E.g. {{'Series1'}, {10}, {4}, {7}}", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
  • Empty SetMasterAndLayout(int idx "Index of slide.", string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.") - Set the layout on the given slide to the layout from the given master.
  • string SetMasterText(string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Set parameters needed to format the fields in the text box with the given name on a specific layout of the master slide. Return resulting plain text value.
  • string SetMasterText(string mastername "Name of the masterslide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Set parameters needed to format the fields in the text box with the given name on a specific master slide. Return resulting plain text value.
  • Empty SetScatterDiagramData(int idx "Index of slide.", string name "Name of diagram.", array data "Data for the table. E.g. {{'XValue', 'YValue-1', 'YValue-2'}, {5, 10, 20}, {2, 4, 6}}", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
  • Empty SetScatterDiagramData(int idx "Index of slide.", string name "Name of diagram.", array data "Data for the table. E.g. {{'XValue', 'YValue-1', 'YValue-2'}, {5, 10, 20}, {2, 4, 6}}", array dataLabels "Label of data.", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
  • Empty SetTable(int idx "Index of slide.", string name "Name of diagram.", int diagramIndex "Data for the table.", bool keepTableWidth "If true, the columnsare split into minor cols. This will keep the width of the table. If false the columns are cloned, which will keep the size of cols, but table may then exceed the slide width.", bool keepTableHeight "If true, the rows are split into minor rows. This will keep the height of the table. If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.") - Set the values of the table with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.
  • Empty SetTableBackgroundColor(int idx "Index of slide.", string name "Name of table.", array coloredCells "Color of cells See Color_fromAny") - Set background color for all cells in the table using array of colors.
  • Empty SetTableBackgroundColorByHexString(int idx "Index of slide.", string name "Name of table.", array coloredCells "See SetTableBackgroundColor") - [Obsolete] Same as SetTableBackgroundColor.
  • Empty SetTableBackgroundColorByRGB(int idx "Index of slide.", string name "Name of table.", array coloredCells "See SetTableBackgroundColor") - [Obsolete] Same as SetTableBackgroundColor.
  • Empty SetTableBackgroundColorPartially(int idx "Index of slide.", string name "Name of table.", array coloredCells "List of array objects in which describes the cell row, column and color specified by color (See Color_fromAny). E.g. {{1, 2, {255,0,0}}, {4, 5, new Color({255,0,0})}, {4, 5, "#FF0000"}}") - Set background color of some of cells in the table using array of colors.
  • Empty SetTableBackgroundColorPartiallyByHexString(int idx "Index of slide.", string name "Name of table.", array coloredCells "See SetTableBackgroundColorPartially") - [Obsolete] Same as SetTableBackgroundColorPartially.
  • Empty SetTableBackgroundColorPartiallyByRGB(int idx "Index of slide.", string name "Name of table.", array coloredCells "See SetTableBackgroundColorPartially") - [Obsolete] Same as SetTableBackgroundColorPartially.
  • Empty SetTableData(int idx "Index of slide.", string name "Name of table.", array data "Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}.", bool keepTableWidth "If true, the last col is split into minor cols. This will keep the width of the table. If false the last col is cloned, which will keep the size of cols, but table may then exceed the slide width.", bool keepTableHeight "If true, the last row is split into minor rows. This will keep the height of the table. If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.") - Set the values of the table with the given name on the given slide to the values given.
  • string SetText(int idx "Index of slide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.
  • Empty SetVerticalAxisMinMaxValues(int idx "Index of slide.", string name "Name of diagram.", number maxValue "Maximum value.", number minValue "Minimum value.") - Set the minimum and maximum values of the vertical axis of the diagram with the given name on the given slide to the values given.
  • Empty SwapDataPointFormat(int idx "Index of slide.", string name "Name of diagram.", int originSeries "Index of origin series.", int originCategory "Index of origin category.", int destinationSeries "Index of destination series.", int destinationCategory "Index of destination category.") - Swap the formatting of two datapoints.
  • (From object) string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.


Related method

  • Color Color_fromAny(object color "Object to convert to color") - Create new color object from anything that can be converted, E.g. {255,0,0}, {255,0,0,32}, "pink", "#FF0000", new Color("pink", false)

Examples

Example for using SetMapChartData

PptFile ppt = new PptFile(new Attachment(18953591));
array geodata = {{"Region"},{"Hovedstaden"},{"Midtjylland"},{"Nordjylland"},{"Sjælland"},{"Syddanmark"}};
array data = {{"Data"}, {0.4}, {0.10},{0.2},{0.1},{0.2}};
ppt.SetMapChartData(1, "Diagram1", geodata, data,"");
ppt.SaveAllAsPptx("test.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));

Example for using SetScatterDiagramData

//Create ppt file with an Attachment
number pptLayoutTemplateRid = 15562782;
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
PptFile ppt = new PptFile(pptLayoutTemplateFile);
//scatterdata for slide 0
number slideIndex = 0;
string diagramName =  "Content Placeholder 7";
array scatterdata = {{"x-values", "y value 1", "y value 2"},{1,5,3}, {2,6,2},{3,10,11},{4,15,16}};
string chartTitle= "Check scatterdata";
ppt.SetScatterDiagramData( slideIndex, diagramName, scatterdata, chartTitle);
//Save to pptx file
string pptDownloadName = "test.pptx";
bool isTemp = false;
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
//print link to download the ppts file
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx

Example for using AddImageToTextBox

//Create ppt file with an Attachment
number pptLayoutTemplateRid = 15596830;
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
PptFile ppt = new PptFile(pptLayoutTemplateFile);
//AddImageToTextBox
number imageAttachmentRId = 15596380;
Attachment imageAttachment = new Attachment(imageAttachmentRId);
number idx = 0;
string textBoxName = "TextBox 2";
number horizontalAlignment=0;//Left, Center, Right [-1, 1]
number verticalAlignment=0;//Top, Middle, Bottom  [-1, 1]
number scaleX = 0;
number scaleY = 0;
ppt.AddImageToTextBox(imageAttachment, idx, textBoxName, horizontalAlignment, verticalAlignment, scaleX, scaleY);
//Save to pptx file
string pptDownloadName = "test.pptx";
bool isTemp = false;
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
//print link to download the ppts file
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx

Example for using AddImageToTextBoxInMaster

//Create ppt file with an Attachment
number pptLayoutTemplateRid = 15596830;
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
PptFile ppt = new PptFile(pptLayoutTemplateFile);
//AddImageToTextBox
Image im = new Image(15597063);
string masterName = "Master 1";
string textBoxName = "TextBox 2";
number horizontalAlignment=1;//Left, Center, Right [-1, 1]
number verticalAlignment=1;//Top, Middle, Bottom  [-1, 1]
number scaleX = 0;
number scaleY = 0;
ppt.AddImageToTextBoxInMaster(im, masterName, textBoxName, horizontalAlignment, verticalAlignment, scaleX, scaleY);
//Save to pptx file
string pptDownloadName = "test.pptx";
bool isTemp = false;
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
//print link to download the ppts file
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx

Example for CopyCell

number pptLayoutTemplateRid = 15599667;
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
PptFile ppt = new PptFile(pptLayoutTemplateFile);
//CopyCell
number originIdx = 0;//"Index of slide."
string originName = "Table1";//"Name of table."
number originRowIdx = 0;//"Index of origin row."
number originColIdx = 0;//"Index of origin col."
number destinationIdx = 0;//"Index of slide."
string destinationName = "Table2";//"Name of table."
number destinationRow = 0;//"Index of destination row. Use -1 to apply to whole col."
number destinationCol = 0;//"Index of destination col. Use -1 to apply to whole row."
bool preserveText = false;//"Keep current text in the destination cell."
bool preserveTextSimple = false;//"If false preserve full text formatting."
ppt.CopyCell(originIdx, originName, originRowIdx, originColIdx, destinationIdx, destinationName, destinationRow, destinationCol, preserveText, preserveTextSimple);
//Save to pptx file
string pptDownloadName = "test.pptx";
bool isTemp = false;
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
//print link to download the ppts file
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));
//http://cghead.catglobe.com/Public/CgsFile.aspx?file=test.pptx

2018-05-09 16-37-26.png

Example for: CopyDataPointFormat

//Create ppt file with an Attachment
number pptLayoutTemplateRid = 15639264;
Attachment pptLayoutTemplateFile = new Attachment(pptLayoutTemplateRid);
PptFile ppt = new PptFile(pptLayoutTemplateFile);
//CopyDataPointFormat
number originidx = 0;
string originname = "Chart"; 
number originSeries = 0;
number originCategory = 4;

number idx =0;
string name = "Chart"; 
number destinationSeries = 0;
number destinationCategory = 2;

ppt.CopyDataPointFormat(originidx, originname, originSeries, originCategory, idx, name, destinationSeries, destinationCategory);
//Save to pptx file
string pptDownloadName = "test.pptx";
bool isTemp = false;
ppt.SaveAllAsPptx(pptDownloadName, isTemp);
//print link to download the ppts file
print(getWebRoot()+ Catglobe.File.GetDownloadPath(pptDownloadName, isTemp));

Example for: SetText

PptFile ppt = new PptFile(new Attachment(16751392));
ppt.SetText(0,"Textbox1",{"consumption habits", 300, 60, 40});
ppt.SaveAllAsPptx("test.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));

Text setup on template file (text fields follow .net style formatting codes. Ex: {0:0.0},{0:P1}):

2021-06-14 14-52-29.png

Result after run script:

2021-06-14 14-53-08.png

Example for SetTableBackgroundColor

PptFile ppt = new PptFile(new Attachment(15923133));
array tableColor ={
	{},//Row1: using color from template
	{"",{},"yellow","#FFFF00",{255,255,0},Color_fromAny("yellow")},//Row2
    //Row2: col1,2 using color from template; col3,4,5,6 set color yellow, col7++ not set (using color from template)
	//Row3++ not set (using color from template)
}; 
ppt.SetTableBackgroundColor(3, "table1", tableColor);
ppt.SaveAllAsPptx("testTableColor.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("testTableColor.pptx", false));

Example for: SetTableBackgroundColorPartially

 
PptFile ppt = new PptFile(new Attachment(15923133));
array tableColor ={
	{0,0,"Yellow"} //{row1,col1,colorYellow}
	{0,1,"#FFFF00"}, //{row1,col2,colorYellow}
	{1,0,{255,255,0}}, //{row2,col1,colorYellow}
	{1,2,Color_fromAny("yellow")} //{row2,col3,colorYellow}
};
ppt.SetTableBackgroundColorPartially(3, "table1", tableColor);
ppt.SaveAllAsPptx("testTableColor.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("testTableColor.pptx", false));

Example for: SetBubbleDiagramData

PptFile ppt = new PptFile(new Attachment(15923121));
array bubbleData = {{3,5,.3}, {2,7,1}, {4,7,2}};// {XValue, YValue, bubbleSize}
ppt.SetBubbleDiagramData(1, "chart1", bubbleData, "");
ppt.SaveAllAsPptx("test.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));

Example for: SetDataPointSolidColor

2021-05-24 14-16-05.jpg

PptFile ppt = new PptFile(new Attachment(15923121));
number seriesIdx = 0;
number dataPointIdx = 0;
Color dataPointColor = Color_fromAny ("red");
ppt.SetDataPointSolidColor(1, "Chart1", seriesIdx, dataPointIdx, dataPointColor);
ppt.SaveAllAsPptx("test.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));

Example for: SetDataPointGradientColor

2021-05-24 14-29-45.jpg

PptFile ppt = new PptFile(new Attachment(15923121));
number seriesIdx = 0;
number dataPointIdx = 0;
array gradientStops = {{0.1, "red"},{0.9, "black"}};
ppt.SetDataPointGradientColor(1, "Chart1", seriesIdx, dataPointIdx, gradientStops);
ppt.SaveAllAsPptx("test.pptx", false);
print(getWebRoot()+ Catglobe.File.GetDownloadPath("test.pptx", false));