Simple types

 

Specifies the range angle.

Type:
  • "xlDownward" | "xlHorizontal" | "xlUpward" | "xlVertical"

Example

Copy code
// Specify that the range contents will be rotated upward:
oWorksheet.GetRange("A1").SetOrientation("xlUpward");
 

Types of all supported forms.

Example

Copy code
// Copies a text form
var oCopyTextForm = oTextForm.Copy();
 

Axis position in the chart.

Type:
  • "top" | "bottom" | "right" | "left"

Example

Copy code
// Set the axis values to the top position of the chart:
oChart.SetAxieNumFormat("top", "0.00");
 

The type of a fill which uses an image as a background.

  • "tile" - if the image is smaller than the shape which is filled, the image will be tiled all over the created shape surface.
  • "stretch" - if the image is smaller than the shape which is filled, the image will be stretched to fit the created shape surface.

Type:
  • "tile" | "stretch"

Example

Copy code
// Create a blip fill with an image which is tiled all over the created shape:
var oFill = Api.CreateBlipFill("https://example.com/myimage.png", "tile");
 

Available values of the "bookmark" reference type:

  • "text" - the entire bookmark text;
  • "pageNum" - the bookmark page number;
  • "paraNum" - the bookmark paragraph number;
  • "noCtxParaNum" - the abbreviated paragraph number (the specific item only, e.g. instead of "4.1.1" you refer to "1" only);
  • "fullCtxParaNum - the full paragraph number, e.g. "4.1.1";
  • "aboveBelow" - the words "above" or "below" depending on the item position.

Type:
  • "text" | "pageNum" | "paraNum" | "noCtxParaNum" | "fullCtxParaNum" | "aboveBelow"

Example

Copy code
// Add a cross-reference to the page containing a bookmark:
oParagraph.AddBookmarkCrossRef("pageNum", sBookmark);
 

Specifies the cell border position.

Type:
  • "DiagonalDown" | "DiagonalUp" | "Bottom" | "Left" | "Right" | "Top" | "InsideHorizontal" | "InsideVertical"

Example

Copy code
// The cell will have a bottom black dotted border:
oWorksheet.GetRange("E2").SetBorders("Bottom", "Dotted", Api.CreateColorFromRGB(0, 0, 0));
 

A border type.

Type:
  • "none" | "single"

Example

Copy code
// The paragraph will have a single 3 point wide green bottom border with a zero offset from the bottom paragraph edge:
oParaPr.SetBottomBorder("single", 24, 0, 0, 255, 0);
 

A bullet type which will be added to the paragraph in spreadsheet or presentation.

Type:
  • "None" | "ArabicPeriod" | "ArabicParenR" | "RomanUcPeriod" | "RomanLcPeriod" | "AlphaLcParenR" | "AlphaLcPeriod" | "AlphaUcParenR" | "AlphaUcPeriod"

Example

Copy code
// The paragraph will be starting with the Arabic numeral which has parenthesis:
var oBullet = Api.CreateNumbering("ArabicParenR");
 

A numeric value from 0 to 255.

Type:
  • number

Example

Copy code
// The resulting color is green, the bytes are measured in decimal numbers:
var oRGBColor = Api.CreateRGBColor(0, 255, 0);
// The resulting color is green, the bytes are measured in hexadecimal numbers:
var oRGBColor = Api.CreateRGBColor(0, 0xff, 0);
 

Possible values for the caption label.

Type:
  • "Table" | "Equation" | "Figure"

Example

Copy code
// Add a cross-reference to the page containing a table caption:
oParagraph.AddCaptionCrossRef("Table", "pageNum", oCaptionParagraph);
 

Possible values for the caption numbering format.

  • "ALPHABETIC" - upper letter.
  • "alphabetic" - lower letter.
  • "Roman" - upper Roman.
  • "roman" - lower Roman.
  • "Arabic" - arabic.

Type:
  • "ALPHABETIC" | "alphabetic" | "Roman" | "roman" | "Arabic"

Example

Copy code
// Add a caption with the Arabic numbering format to the paragraph:
oParagraph.AddCaption("", "Figure", false, "Arabic", false, undefined, "hyphen");
 

Available values of the "equation"/"figure"/"table" reference type:

  • "entireCaption"- the entire caption text;
  • "labelNumber" - the label and object number only, e.g. "Table 1.1";
  • "captionText" - the caption text only;
  • "pageNum" - the page number containing the referenced object;
  • "aboveBelow" - the words "above" or "below" depending on the item position.

Type:
  • "entireCaption" | "labelNumber" | "captionText" | "pageNum" | "aboveBelow"

Example

Copy code
// Add a cross-reference to the page containing a table caption:
oParagraph.AddCaptionCrossRef("Table", "pageNum", oCaptionParagraph);
 

Possible values for the caption separator.

  • "hyphen" - the "-" punctuation mark.
  • "period" - the "." punctuation mark.
  • "colon" - the ":" punctuation mark.
  • "longDash" - the "—" punctuation mark.
  • "dash" - the "-" punctuation mark.

Type:
  • "hyphen" | "period" | "colon" | "longDash" | "dash"

Example

Copy code
// Add a caption with a hyphen as a numbering separator to the paragraph:
oParagraph.AddCaption("", "Figure", false, "Arabic", false, undefined, "hyphen");
 

This type specifies the available chart types which can be used to create a new chart.

Type:
  • "bar" | "barStacked" | "barStackedPercent" | "bar3D" | "barStacked3D" | "barStackedPercent3D" | "barStackedPercent3DPerspective" | "horizontalBar" | "horizontalBarStacked" | "horizontalBarStackedPercent" | "horizontalBar3D" | "horizontalBarStacked3D" | "horizontalBarStackedPercent3D" | "lineNormal" | "lineStacked" | "lineStackedPercent" | "line3D" | "pie" | "pie3D" | "doughnut" | "scatter" | "stock" | "area" | "areaStacked" | "areaStackedPercent"

Example

Copy code
// ChartType used in text documents
// The resulting chart will have a 'bar3D' type:
var oChart = Api.CreateChart("bar3D", [[200, 240, 280],[250, 260, 280]], ["Projected Revenue", "Estimated Costs"], [2014, 2015, 2016], 4051300, 2347595, 24);

// ChartType used in spreadsheets
// The resulting chart will have a 'bar3D' type:
var oChart = oWorksheet.AddChart("'Sheet1'!$A$1:$D$3", true, "bar3D", 2, 100 * 36000, 70 * 36000, 0, 2 * 36000, 7, 3 * 36000);
 

Checkbox / radio button properties.

Example

Copy code
// Create a checkbox form with the common and specific checkbox form properties:
var oCheckBoxFormPr = {"key": "Marital status", "tip": "Specify your marital status", "required": true, "placeholder": "Marital status", "radio": true};
var oCheckBoxForm = Api.CreateCheckBoxForm(oCheckBoxFormPr);
 

Specific checkbox / radio button properties.

Type:
  • Object
Properties:
Name Type Description
radio boolean

Specifies if the current checkbox is a radio button. In this case, the key parameter is considered as an identifier for the group of radio buttons.

Example

Copy code
// Create a checkbox form with the specific checkbox form properties:
var oCheckBoxFormPrBase = {"radio": true};
var oCheckBoxForm = Api.CreateCheckBoxForm(oCheckBoxFormPrBase);
 

Combo box / dropdown list properties.

Example

Copy code
// Create a combo box form with the common and specific combo box form properties:
var oComboBoxFormPr = {"key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]};
var oComboBoxForm = Api.CreateComboBoxForm(oComboBoxFormPr);
 

Specific combo box / dropdown list properties.

Type:
  • Object
Properties:
Name Type Description
editable boolean

Specifies if the combo box text can be edited.

autoFit boolean

Specifies if the combo box form content should be autofit, i.e. whether the font size adjusts to the size of the fixed size form.

items Array.<(string|Array.)>

The combo box items. This array consists of strings or arrays of two strings where the first string is the displayed value and the second one is its meaning. If the array consists of single strings, then the displayed value and its meaning are the same. Example: ["First", ["Second", "2"], ["Third", "3"], "Fourth"].

Example

Copy code
// Create a combo box form with the specific combo box form properties:
var oComboBoxFormPrBase = {"editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]};
var oComboBoxForm = Api.CreateComboBoxForm(oComboBoxFormPrBase);
 

Report on all comments. This is a dictionary where the keys are usernames.

Type:
  • Object.<string, Array.<CommentReportRecord>>

Example

Copy code
// Report on all comments:
var oCommentReport = {
	"John Smith" : [{"IsAnswer": false, "CommentMessage": "Good text", "Date": 1688588002698, "DateUTC": 1688570002698, "QuoteText": "Some text"},
		{"IsAnswer": true, "CommentMessage": "I don't think so", "Date": 1688588012661, "DateUTC": 1688570012661}],

	"Mark Pottato" : [{"IsAnswer": false, "CommentMessage": "Need to change this part", "Date": 1688587967245, "DateUTC": 1688569967245, "QuoteText": "The quick brown fox jumps over the lazy dog"},
		{"IsAnswer": false, "CommentMessage": "We need to add a link", "Date": 1688587967245, "DateUTC": 1688569967245, "QuoteText": "OnlyOffice"}]
}
 

Record of one comment.

Type:
  • Object
Properties:
Name Type Description
IsAnswer boolean

Specifies whether this is an initial comment or a reply to another comment.

CommentMessage string

The text of the current comment.

Date number

The time when this change was made in local time.

DateUTC number

The time when this change was made in UTC.

QuoteText string

The text to which this comment is related.

Example

Copy code
// Report on all comments that contains two comments from each user:
var oCommentReportRecord1 = {"IsAnswer": false, "CommentMessage": "Good text", "Date": 1688588002698, "DateUTC": 1688570002698, "QuoteText": "Some text"};
var oCommentReportRecord2 = {"IsAnswer": true, "CommentMessage": "I don't think so", "Date": 1688588012661, "DateUTC": 1688570012661};
var oCommentReportRecord3 = {"IsAnswer": false, "CommentMessage": "Need to change this part", "Date": 1688587967245, "DateUTC": 1688569967245, "QuoteText": "The quick brown fox jumps over the lazy dog"};
var oCommentReportRecord4 = {"IsAnswer": false, "CommentMessage": "We need to add a link", "Date": 1688587967245, "DateUTC": 1688569967245, "QuoteText": "OnlyOffice"};
var oCommentReport = {
	"John Smith" : [oCommentReportRecord1, oCommentReportRecord2],
	"Mark Pottato" : [oCommentReportRecord3, oCommentReportRecord4]
}
 

Specifies the direction of end in the specified range.

Type:
  • "xlUp" | "xlDown" | "xlToRight" | "xlToLeft"

Example

Copy code
// Return a Range object that represents the left end of the specified range:
oWorksheet.GetRange("C4:D5").End("xlToLeft").SetFillColor(Api.CreateColorFromRGB(255, 224, 204));
 

Any valid element which can be added to the document structure.

Example

Copy code
// Add a document element called 'paragraph' to the document:
oDocument.AddElement(oParagraph);
 

English measure unit. 1 mm = 36000 EMUs, 1 inch = 914400 EMUs.

Type:
  • number

Example

Copy code
// Set the size of the drawing to be created as 100 mm (10 cm) in width and 100 mm (10 cm) in height:
oDrawing.SetSize(100 * 36000, 100 * 36000);
 

Available values of the "endnote" reference type:

  • "endnoteNum" - the endnote number;
  • "pageNum" - the endnote page number;
  • "aboveBelow" - the words "above" or "below" depending on the item position;
  • "formEndnoteNum" - the form number formatted as an endnote. The numbering of the actual endnotes is not affected.

Type:
  • "endnoteNum" | "pageNum" | "aboveBelow" | "formEndnoteNum"

Example

Copy code
// Add a cross-reference to the page containing an endnote:
oParagraph.AddEndnoteCrossRef("pageNum", oEndnoteParagraph);
 

Available values of the "footnote" reference type:

  • "footnoteNum" - the footnote number;
  • "pageNum" - the page number of the footnote;
  • "aboveBelow" - the words "above" or "below" depending on the position of the item;
  • "formFootnoteNum" - the form number formatted as a footnote. The numbering of the actual footnotes is not affected.

Type:
  • "footnoteNum" | "pageNum" | "aboveBelow" | "formFootnoteNum"

Example

Copy code
// Add a cross-reference to the page containing a footnote:
oParagraph.AddFootnoteCrossRef("pageNum", oFootnoteParagraph);
 

Form data.

Type:
  • Object
Properties:
Name Type Description
key string

The form key. If the current form is a radio button, then this field contains the group key.

value string | boolean

The current field value.

tag string

The form tag.

type FormSpecificType

The form type.

Example

Copy code
// Set the specified form data to the first form of the current document:
var oFormData = {"key": "CompanyName", "value": "ONLYOFFICE", "type": "text"};
oDocument.SetFormsData([oFormData]);
 

Form insertion specific properties.

Type:
  • Object
Properties:
Name Type Description
placeholderFromSelection boolean

Specifies if the currently selected text should be saved as a placeholder of the inserted form.

keepSelectedTextInForm boolean

Specifies if the currently selected text should be saved as the content of the inserted form.

Example

Copy code
// Insert a text box with the specified text box properties over the selected text:
var oTextFormInsertPr = {"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "Name", "comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false, "placeholderFromSelection": true, "keepSelectedTextInForm": false};
oDocument.InsertTextForm(oTextFormInsertPr);
 

Common form properties.

Type:
  • Object
Properties:
Name Type Description
key string

Form key.

tip string

Form tip text.

required boolean

Specifies if the form is required or not.

placeholder string

Form placeholder text.

Example

Copy code
// Create a text form with the common form properties:
var oFormPrBase = {"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "First name"};
var oTextForm = Api.CreateTextForm(oFormPrBase);
 

The specific form type.

Type:
  • "text" | "checkBox" | "picture" | "comboBox" | "dropDownList" | "dateTime" | "radio"

Example

Copy code
// Set the "text" form type to the first form of the current document:
var sFormSpecificType = "text";
var oFormData = {"key": "CompanyName", "value": "ONLYOFFICE", "type": sFormSpecificType};
oDocument.SetFormsData([oFormData]);
 

Form type. The available form types.

Type:
  • "textForm" | "comboBoxForm" | "dropDownForm" | "checkBoxForm" | "radioButtonForm" | "pictureForm"

Example

Copy code
// Return a type of the current form:
var sFormType = oTextForm.GetFormType();
 

Specifies a type of freeze panes.

Type:
  • "row" | "column" | "cell" | null

Example

Copy code
// Set the "column" freeze pane type to the current worksheet:
var sFreezePaneType = "column";
Api.SetFreezePanesType(sFreezePaneType);
 

Header and footer types which can be applied to the document sections.

  • "default" - a header or footer which can be applied to any default page.
  • "title" - a header or footer which is applied to the title page.
  • "even" - a header or footer which can be applied to even pages to distinguish them from the odd ones (which will be considered default).

Type:
  • "default" | "title" | "even"

Example

Copy code
// Remove the header of the 'title' type from the final document section:
var oDocContent = oFinalSection.RemoveHeader("title");
 

Available values of the "heading" reference type:

  • "text" - the entire heading text;
  • "pageNum" - the heading page number;
  • "headingNum" - the heading sequence number;
  • "noCtxHeadingNum" - the abbreviated heading number. Make sure the cursor pointer is in the section you are referencing to, e.g. you are in section 4 and you wish to refer to heading 4.B, so instead of "4.B" you receive "B" only;
  • "fullCtxHeadingNum" - the full heading number even if the cursor pointer is in the same section;
  • "aboveBelow" - the words "above" or "below" depending on the item position.

Type:
  • "text" | "pageNum" | "headingNum" | "noCtxHeadingNum" | "fullCtxHeadingNum" | "aboveBelow"

Example

Copy code
// Add a cross-reference to the page containing a heading:
oParagraph.AddHeadingCrossRef("pageNum", oHeadingParagraph);
 

Available highlight colors.

Type:
  • "black" | "blue" | "cyan" | "green" | "magenta" | "red" | "yellow" | "white" | "darkBlue" | "darkCyan" | "darkGreen" | "darkMagenta" | "darkRed" | "darkYellow" | "darkGray" | "lightGray" | "none"

Example

Copy code
// Highlight a paragraph in green:
oParagraph.SetHighlight("green");
 

Half-points (2 half-points = 1 point).

Type:
  • number

Example

Copy code
// Set the text font size to 22 half-points:
oTextPr.SetFontSize(22);
 

240ths of a line.

Type:
  • number

Example

Copy code
// The paragraph line spacing is set to 1 line:
oParaPr.SetSpacingLine(240, "auto");
 

Specifies the line style used to form the cell border.

Type:
  • "None" | "Double" | "Hair" | "DashDotDot" | "DashDot" | "Dotted" | "Dashed" | "Thin" | "MediumDashDotDot" | "SlantDashDot" | "MediumDashDot" | "MediumDashed" | "Medium" | "Thick"

Example

Copy code
// The cell will have a bottom black dotted border:
oWorksheet.GetRange("E2").SetBorders("Bottom", "Dotted", Api.CreateColorFromRGB(0, 0, 0));
 

1 millimetre equals 1/10th of a centimetre.

Type:
  • number

Example

Copy code
// Set the cell width measured in millimeters to the applied comb of characters:
oTextForm.SetCellWidth(7);
 

Available values of the "numbered" reference type:

  • "pageNum" - the numbered item page number;
  • "paraNum" - the numbered item paragraph number;
  • "noCtxParaNum" - the abbreviated paragraph number (the specific item only, e.g. instead of "4.1.1" you refer to "1" only);
  • "fullCtxParaNum" - the full paragraph number, e.g. "4.1.1";
  • "text" - the paragraph text value, e.g. if you have "4.1.1. Terms and Conditions", you refer to "Terms and Conditions" only;
  • "aboveBelow" - the words "above" or "below" depending on the item position.

Type:
  • "pageNum" | "paraNum" | "noCtxParaNum" | "fullCtxParaNum" | "text" | "aboveBelow"

Example

Copy code
// Add a cross-reference to the page containing a numbered paragraph:
oParagraph.AddNumberedCrossRef("pageNum", oNumberedParagraph, true, true);
 

Standard numeric format.

Type:
  • "General" | "0" | "0.00" | "#,##0" | "#,##0.00" | "0%" | "0.00%" | "0.00E+00" | "# ?/?" | "# ??/??" | "m/d/yyyy" | "d-mmm-yy" | "d-mmm" | "mmm-yy" | "h:mm AM/PM" | "h:mm:ss AM/PM" | "h:mm" | "h:mm:ss" | "m/d/yyyy h:mm" | "#,##0_);(#,##0)" | "#,##0_);[Red](#,##0)" | "#,##0.00_);(#,##0.00)" | "#,##0.00_);[Red](#,##0.00)" | "mm:ss" | "[h]:mm:ss" | "mm:ss.0" | "##0.0E+0" | "@"

Example

Copy code
// Set the "0.00" numeric format to the chart data point:
oChart.SetDataPointNumFormat("0.00", 0, 1, true);
 

The page orientation type.

Type:
  • "xlLandscape" | "xlPortrait"

Example

Copy code
// Set the page orientation to portrait:
oWorksheet.SetPageOrientation("xlPortrait");
 

The types of elements that can be added to the paragraph structure.

Example

Copy code
// Add an element called 'text run' to the paragraph:
oParagraph.AddElement(oRun,0);
 

The available preset patterns which can be used for the fill.

Type:
  • "cross" | "dashDnDiag" | "dashHorz" | "dashUpDiag" | "dashVert" | "diagBrick" | "diagCross" | "divot" | "dkDnDiag" | "dkHorz" | "dkUpDiag" | "dkVert" | "dnDiag" | "dotDmnd" | "dotGrid" | "horz" | "horzBrick" | "lgCheck" | "lgConfetti" | "lgGrid" | "ltDnDiag" | "ltHorz" | "ltUpDiag" | "ltVert" | "narHorz" | "narVert" | "openDmnd" | "pct10" | "pct20" | "pct25" | "pct30" | "pct40" | "pct5" | "pct50" | "pct60" | "pct70" | "pct75" | "pct80" | "pct90" | "plaid" | "shingle" | "smCheck" | "smConfetti" | "smGrid" | "solidDmnd" | "sphere" | "trellis" | "upDiag" | "vert" | "wave" | "wdDnDiag" | "wdUpDiag" | "weave" | "zigZag"

Example

Copy code
// Create a fill with a 'dashDnDiag' pattern which has two colors - green and red:
var oFill = Api.CreatePatternFill("dashDnDiag", Api.CreateRGBColor(0, 225, 0), Api.CreateRGBColor(255, 0, 0));
 

Value from 0 to 100.

Type:
  • number

Example

Copy code
// Set the picture position measured in percent inside the current form:
oPictureForm.SetPicturePosition(70, 70);
 

Picture form properties.

Example

Copy code
// Create a picture form with the common and specific picture form properties:
var oPictureFormPr = {"key": "Personal information", "tip": "Upload your photo", "required": true, "placeholder": "Photo", "scaleFlag": "tooBig", "lockAspectRatio": true, "respectBorders": false, "shiftX": 50, "shiftY": 50};
var oPictureForm = Api.CreatePictureForm(oPictureFormPr);
 

Specific picture form properties.

Type:
  • Object
Properties:
Name Type Description
scaleFlag ScaleFlag

The condition to scale an image in the picture form: "always", "never", "tooBig" or "tooSmall".

lockAspectRatio boolean

Specifies if the aspect ratio of the picture form is locked or not.

respectBorders boolean

Specifies if the form border width is respected or not when scaling the image.

shiftX percentage

Horizontal picture position inside the picture form measured in percent:

  • 0 - the picture is placed on the left;
  • 50 - the picture is placed in the center;
  • 100 - the picture is placed on the right.
shiftY percentage

Vertical picture position inside the picture form measured in percent:

  • 0 - the picture is placed on top;
  • 50 - the picture is placed in the center;
  • 100 - the picture is placed on the bottom.

Example

Copy code
// Create a picture form with the specific picture form properties:
var oPictureFormPrBase = {"scaleFlag": "tooBig", "lockAspectRatio": true, "respectBorders": false, "shiftX": 50, "shiftY": 50};
var oPictureForm = Api.CreatePictureForm(oPictureFormPrBase);
 

60000th of a degree (5400000 = 90 degrees).

Type:
  • number

Example

Copy code
// The resulting gradient direction angle is 90 degrees:
var oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 5400000);
 

The 1000th of a percent (100000 = 100%).

Type:
  • number

Example

Copy code
// The resulting gradient stop position is 100%:
var oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(255, 164, 101), 100000);
 

The available preset color names.

Type:
  • "aliceBlue" | "antiqueWhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedAlmond" | "blue" | "blueViolet" | "brown" | "burlyWood" | "cadetBlue" | "chartreuse" | "chocolate" | "coral" | "cornflowerBlue" | "cornsilk" | "crimson" | "cyan" | "darkBlue" | "darkCyan" | "darkGoldenrod" | "darkGray" | "darkGreen" | "darkGrey" | "darkKhaki" | "darkMagenta" | "darkOliveGreen" | "darkOrange" | "darkOrchid" | "darkRed" | "darkSalmon" | "darkSeaGreen" | "darkSlateBlue" | "darkSlateGray" | "darkSlateGrey" | "darkTurquoise" | "darkViolet" | "deepPink" | "deepSkyBlue" | "dimGray" | "dimGrey" | "dkBlue" | "dkCyan" | "dkGoldenrod" | "dkGray" | "dkGreen" | "dkGrey" | "dkKhaki" | "dkMagenta" | "dkOliveGreen" | "dkOrange" | "dkOrchid" | "dkRed" | "dkSalmon" | "dkSeaGreen" | "dkSlateBlue" | "dkSlateGray" | "dkSlateGrey" | "dkTurquoise" | "dkViolet" | "dodgerBlue" | "firebrick" | "floralWhite" | "forestGreen" | "fuchsia" | "gainsboro" | "ghostWhite" | "gold" | "goldenrod" | "gray" | "green" | "greenYellow" | "grey" | "honeydew" | "hotPink" | "indianRed" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderBlush" | "lawnGreen" | "lemonChiffon" | "lightBlue" | "lightCoral" | "lightCyan" | "lightGoldenrodYellow" | "lightGray" | "lightGreen" | "lightGrey" | "lightPink" | "lightSalmon" | "lightSeaGreen" | "lightSkyBlue" | "lightSlateGray" | "lightSlateGrey" | "lightSteelBlue" | "lightYellow" | "lime" | "limeGreen" | "linen" | "ltBlue" | "ltCoral" | "ltCyan" | "ltGoldenrodYellow" | "ltGray" | "ltGreen" | "ltGrey" | "ltPink" | "ltSalmon" | "ltSeaGreen" | "ltSkyBlue" | "ltSlateGray" | "ltSlateGrey" | "ltSteelBlue" | "ltYellow" | "magenta" | "maroon" | "medAquamarine" | "medBlue" | "mediumAquamarine" | "mediumBlue" | "mediumOrchid" | "mediumPurple" | "mediumSeaGreen" | "mediumSlateBlue" | "mediumSpringGreen" | "mediumTurquoise" | "mediumVioletRed" | "medOrchid" | "medPurple" | "medSeaGreen" | "medSlateBlue" | "medSpringGreen" | "medTurquoise" | "medVioletRed" | "midnightBlue" | "mintCream" | "mistyRose" | "moccasin" | "navajoWhite" | "navy" | "oldLace" | "olive" | "oliveDrab" | "orange" | "orangeRed" | "orchid" | "paleGoldenrod" | "paleGreen" | "paleTurquoise" | "paleVioletRed" | "papayaWhip" | "peachPuff" | "peru" | "pink" | "plum" | "powderBlue" | "purple" | "red" | "rosyBrown" | "royalBlue" | "saddleBrown" | "salmon" | "sandyBrown" | "seaGreen" | "seaShell" | "sienna" | "silver" | "skyBlue" | "slateBlue" | "slateGray" | "slateGrey" | "snow" | "springGreen" | "steelBlue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whiteSmoke" | "yellow" | "yellowGreen"

Example

Copy code
// Create a scheme color using the 'lightYellow' color preset:
var oSchemeColor = Api.CreatePresetColor("lightYellow");
 

A point.

Type:
  • number

Example

Copy code
// The paragraph will have a single 3 point wide green bottom border with a 1 point offset from the bottom paragraph edge:
oParaPr.SetBottomBorder("single", 24, 1, 0, 255, 0);
 

Eighths of a point (24 eighths of a point = 3 points).

Type:
  • number

Example

Copy code
// The paragraph will have a single 6 point wide green bottom border with a zero offset from the bottom paragraph edge:
oParaPr.SetBottomBorder("single", 48, 0, 0, 255, 0);
 

The possible values for the base which the relative horizontal positioning of an object will be calculated from.

Type:
  • "character" | "column" | "leftMargin" | "rightMargin" | "margin" | "page"

Example

Copy code
// The created drawing will be centered horizontally relative to the page width:
oDrawing.SetHorAlign("page", "center");
 

The possible values for the base which the relative vertical positioning of an object will be calculated from.

Type:
  • "bottomMargin" | "topMargin" | "margin" | "page" | "line" | "paragraph"

Example

Copy code
// The created drawing will be centered vertically relative to the page height:
oDrawing.SetVerAlign("page", "center");
 

Properties to make search and replace.

Type:
  • Object
Properties:
Name Type Description
What string | undefined

The data to search for.

Replacement string

The replacement string.

LookAt XlLookAt

Specifies whether the whole search text or any part of the search text is matched.

SearchOrder XlSearchOrder

Range search order - by rows or by columns.

SearchDirection XlSearchDirection

Range search direction - next match or previous match.

MatchCase boolean

Case sensitive or not. The default value is "false".

ReplaceAll boolean

Specifies if all the found data will be replaced or not. The default value is "true".

Example

Copy code
// Replaces the specific data to another one in a range:
var oRange = oWorksheet.GetRange("A2:D4");
var oReplaceData = {"What": "200", "Replacement": "0", "LookAt": "xlWhole", "SearchOrder": "xlByColumns", "SearchDirection": "xlNext", "MatchCase": true, "ReplaceAll": true};
oRange.Replace(oReplaceData);
 

Report on all review changes. This is a dictionary where the keys are usernames.

Type:
  • Object.<string, Array.<ReviewReportRecord>>

Example

Copy code
// Report on all review changes:
var oReviewRecord = {
	"John Smith" : [{"Type": "TextRem", "Value": "Hello, Mark!", "Date": 1679941734161},
					{"Type": "TextAdd", "Value": "Dear Mr. Pottato.", "Date": 1679941736189}],
	"Mark Pottato" : [{"Type": "ParaRem", "Date": 1679941755942},
					{"Type": "TextPr", "Date": 1679941757832}]
};
 

Record of one review change.

Type:
  • Object
Properties:
Name Type Description
Type ReviewReportRecordType

Review record type.

Value string

Review change value that is set for the "TextAdd" and "TextRem" types only.

Date number

The time when this change was made.

Example

Copy code
// Report on all review changes that contains two review records for each user:
var oReviewReportRecord1 = {"Type": "TextRem", "Value": "Hello, Mark!", "Date": 1679941734161};
var oReviewReportRecord2 = {"Type": "TextAdd", "Value": "Dear Mr. Pottato.", "Date": 1679941736189};
var oReviewReportRecord3 = {"Type": "ParaRem", "Date": 1679941755942};
var oReviewReportRecord4 = {"Type": "TextPr", "Date": 1679941757832};
var oReviewRecord = {
	"John Smith" : [oReviewReportRecord1, oReviewReportRecord2],
	"Mark Pottato" : [oReviewReportRecord3, oReviewReportRecord4]
};
 

Review record type.

Type:
  • "TextAdd" | "TextRem" | "ParaAdd" | "ParaRem" | "TextPr" | "ParaPr" | "Unknown"

Example

Copy code
// Report on all review changes that contains review records of four different types: "TextRem" - removing text, "TextAdd" - adding text, "ParaRem" - removing a paragraph, "TextPr" - changing text properties:
var oReviewReportRecord1 = {"Type": "TextRem", "Value": "Hello, Mark!", "Date": 1679941734161};
var oReviewReportRecord2 = {"Type": "TextAdd", "Value": "Dear Mr. Pottato.", "Date": 1679941736189};
var oReviewReportRecord3 = {"Type": "ParaRem", "Date": 1679941755942};
var oReviewReportRecord4 = {"Type": "TextPr", "Date": 1679941757832};
var oReviewRecord = {
	"John Smith" : [oReviewReportRecord1, oReviewReportRecord2],
	"Mark Pottato" : [oReviewReportRecord3, oReviewReportRecord4]
}
 

The condition to scale an image in the picture form.

Type:
  • "always" | "never" | "tooBig" | "tooSmall"

Example

Copy code
// Set the scaling condition when the current picture form is scaled if it is too big:
oPictureForm.SetScaleFlag("tooBig");
 

The available color scheme identifiers.

Type:
  • "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "bg1" | "bg2" | "dk1" | "dk2" | "lt1" | "lt2" | "tx1" | "tx2"

Example

Copy code
// Create a scheme color with the 'accent2' identifier:
var oSchemeColor = Api.CreateSchemeColor("accent2");
 

The lock type of the content control.

Type:
  • "unlocked" | "contentLocked" | "sdtContentLocked" | "sdtLocked"

Example

Copy code
// Set the "sdtContentLocked" lock to the current inline text content control which means that the content cannot be edited and the container cannot be deleted:
oInlineLvlSdt.SetLock("sdtContentLocked");
 

Properties to make search.

Type:
  • Object
Properties:
Name Type Description
What string | undefined

The data to search for.

After ApiRange

The cell after which you want the search to begin. If this argument is not specified, the search starts after the cell in the upper-left corner of the range.

LookIn XlFindLookIn

Search data type (formulas or values).

LookAt XlLookAt

Specifies whether the whole search text or any part of the search text is matched.

SearchOrder XlSearchOrder

Range search order - by rows or by columns.

SearchDirection XlSearchDirection

Range search direction - next match or previous match.

MatchCase boolean

Case sensitive or not. The default value is "false".

Example

Copy code
// Finds the specific data in the current range:
var oRange = oWorksheet.GetRange("A2:D4");
var oSearchData = {"What": "200", "After": "B1", "LookIn": "xlValues", "LookAt": "xlWhole", "SearchOrder": "xlByColumns", "SearchDirection": "xlNext", "MatchCase": true};
var oSearchRange = oRange.Find(oSearchData);
 

This type specifies the preset shape geometry that will be used for a shape.

Type:
  • "accentBorderCallout1" | "accentBorderCallout2" | "accentBorderCallout3" | "accentCallout1" | "accentCallout2" | "accentCallout3" | "actionButtonBackPrevious" | "actionButtonBeginning" | "actionButtonBlank" | "actionButtonDocument" | "actionButtonEnd" | "actionButtonForwardNext" | "actionButtonHelp" | "actionButtonHome" | "actionButtonInformation" | "actionButtonMovie" | "actionButtonReturn" | "actionButtonSound" | "arc" | "bentArrow" | "bentConnector2" | "bentConnector3" | "bentConnector4" | "bentConnector5" | "bentUpArrow" | "bevel" | "blockArc" | "borderCallout1" | "borderCallout2" | "borderCallout3" | "bracePair" | "bracketPair" | "callout1" | "callout2" | "callout3" | "can" | "chartPlus" | "chartStar" | "chartX" | "chevron" | "chord" | "circularArrow" | "cloud" | "cloudCallout" | "corner" | "cornerTabs" | "cube" | "curvedConnector2" | "curvedConnector3" | "curvedConnector4" | "curvedConnector5" | "curvedDownArrow" | "curvedLeftArrow" | "curvedRightArrow" | "curvedUpArrow" | "decagon" | "diagStripe" | "diamond" | "dodecagon" | "donut" | "doubleWave" | "downArrow" | "downArrowCallout" | "ellipse" | "ellipseRibbon" | "ellipseRibbon2" | "flowChartAlternateProcess" | "flowChartCollate" | "flowChartConnector" | "flowChartDecision" | "flowChartDelay" | "flowChartDisplay" | "flowChartDocument" | "flowChartExtract" | "flowChartInputOutput" | "flowChartInternalStorage" | "flowChartMagneticDisk" | "flowChartMagneticDrum" | "flowChartMagneticTape" | "flowChartManualInput" | "flowChartManualOperation" | "flowChartMerge" | "flowChartMultidocument" | "flowChartOfflineStorage" | "flowChartOffpageConnector" | "flowChartOnlineStorage" | "flowChartOr" | "flowChartPredefinedProcess" | "flowChartPreparation" | "flowChartProcess" | "flowChartPunchedCard" | "flowChartPunchedTape" | "flowChartSort" | "flowChartSummingJunction" | "flowChartTerminator" | "foldedCorner" | "frame" | "funnel" | "gear6" | "gear9" | "halfFrame" | "heart" | "heptagon" | "hexagon" | "homePlate" | "horizontalScroll" | "irregularSeal1" | "irregularSeal2" | "leftArrow" | "leftArrowCallout" | "leftBrace" | "leftBracket" | "leftCircularArrow" | "leftRightArrow" | "leftRightArrowCallout" | "leftRightCircularArrow" | "leftRightRibbon" | "leftRightUpArrow" | "leftUpArrow" | "lightningBolt" | "line" | "lineInv" | "mathDivide" | "mathEqual" | "mathMinus" | "mathMultiply" | "mathNotEqual" | "mathPlus" | "moon" | "nonIsoscelesTrapezoid" | "noSmoking" | "notchedRightArrow" | "octagon" | "parallelogram" | "pentagon" | "pie" | "pieWedge" | "plaque" | "plaqueTabs" | "plus" | "quadArrow" | "quadArrowCallout" | "rect" | "ribbon" | "ribbon2" | "rightArrow" | "rightArrowCallout" | "rightBrace" | "rightBracket" | "round1Rect" | "round2DiagRect" | "round2SameRect" | "roundRect" | "rtTriangle" | "smileyFace" | "snip1Rect" | "snip2DiagRect" | "snip2SameRect" | "snipRoundRect" | "squareTabs" | "star10" | "star12" | "star16" | "star24" | "star32" | "star4" | "star5" | "star6" | "star7" | "star8" | "straightConnector1" | "stripedRightArrow" | "sun" | "swooshArrow" | "teardrop" | "trapezoid" | "triangle" | "upArrowCallout" | "upDownArrow" | "upDownArrow" | "upDownArrowCallout" | "uturnArrow" | "verticalScroll" | "wave" | "wedgeEllipseCallout" | "wedgeRectCallout" | "wedgeRoundRectCallout"

Example

Copy code
// Create a shape using the 'diamond' preset:
var oDrawing = Api.CreateShape("diamond", 100 * 36000, 100 * 36000, oFill, oStroke);
 

A shade type which can be added to the document element.

Type:
  • "nil" | "clear"

Example

Copy code
// Add a green shadow to the table:
oTablePr.SetShd("clear", 0, 255, 0, false);
 

Specifies whether the first row of the sort range contains the header information.

Type:
  • "xlNo" | "xlYes"

Example

Copy code
// Specify that the first row contains header information:
oWorksheet.GetRange("A1:C5").SetSort("A1:A5", "xlAscending", "B1:B5", "xlDescending", "C1:C5", "xlAscending", "xlYes", "xlSortColumns");
 

Specifies the sort order.

Type:
  • "xlAscending" | "xlDescending"

Example

Copy code
// Specify that the sort order for the values specified in "A1:A5" is ascending:
oWorksheet.GetRange("A1:C5").SetSort("A1:A5", "xlAscending", "B1:B5", "xlDescending", "C1:C5", "xlAscending", "xlYes", "xlSortColumns");
 

Specifies if the sort should be by row or column.

Type:
  • "xlSortColumns" | "xlSortRows"

Example

Copy code
// Specify that the sort should be by column:
oWorksheet.GetRange("A1:C5").SetSort("A1:A5", "xlAscending", "B1:B5", "xlDescending", "C1:C5", "xlAscending", "xlYes", "xlSortColumns");
 

The style type used for the document element.

Type:
  • "paragraph" | "table" | "run" | "numbering"

Example

Copy code
// Assign the default document paragraph style to the 'oNormalStyle' variable:
var oNormalStyle = oDocument.GetDefaultStyle("paragraph");
 

Types of custom tab.

Type:
  • "clear" | "left" | "right" | "center"

Example

Copy code
// Set tab positions at 50, 75 and 150 points with the text aligned center, left and right at each tab stop accordingly:
oParaPr.SetTabs([1000, 1500, 3000], ["center", "left", "right"]);
 

This simple type specifies possible values for the table sections to which the current conditional formatting properties will be applied when this selected table style is used.

  • "topLeftCell" - specifies that the table formatting is applied to the top left cell.
  • "topRightCell" - specifies that the table formatting is applied to the top right cell.
  • "bottomLeftCell" - specifies that the table formatting is applied to the bottom left cell.
  • "bottomRightCell" - specifies that the table formatting is applied to the bottom right cell.
  • "firstRow" - specifies that the table formatting is applied to the first row.
  • "lastRow" - specifies that the table formatting is applied to the last row.
  • "firstColumn" - specifies that the table formatting is applied to the first column. Any subsequent row which is in table header (ApiTableRowPr#SetTableHeader) will also use this conditional format.
  • "lastColumn" - specifies that the table formatting is applied to the last column.
  • "bandedColumn" - specifies that the table formatting is applied to odd numbered groupings of rows.
  • "bandedColumnEven" - specifies that the table formatting is applied to even numbered groupings of rows.
  • "bandedRow" - specifies that the table formatting is applied to odd numbered groupings of columns.
  • "bandedRowEven" - specifies that the table formatting is applied to even numbered groupings of columns.
  • "wholeTable" - specifies that the conditional formatting is applied to the whole table.

Type:
  • "topLeftCell" | "topRightCell" | "bottomLeftCell" | "bottomRightCell" | "firstRow" | "lastRow" | "firstColumn" | "lastColumn" | "bandedColumn" | "bandedColumnEven" | "bandedRow" | "bandedRowEven" | "wholeTable"

Example

Copy code
// Apply the created style (set shadow) to the top left cell of the table:
oTableStyle.GetConditionalTableStyle("topLeftCell").GetTableCellPr().SetShd("clear", 255, 0, 0);
 

The possible values for the units of the width property are defined by a specific table or table cell width property.

  • "auto" - sets the table or table cell width to auto width.
  • "twips" - sets the table or table cell width to be measured in twentieths of a point.
  • "nul" - sets the table or table cell width to be of a zero value.
  • "percent" - sets the table or table cell width to be measured in percent to the parent container.

Type:
  • "auto" | "twips" | "nul" | "percent"

Example

Copy code
// Set the width of the table cell equal to 100 points (2000 twips):
oTableCell.SetWidth("twips", 2000);
 

Properties for inserting a text field.

Example

Copy code
// Insert a text box with the specified text box properties over the selected text:
var oTextFormInsertPr = {"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "Name", "comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false, "placeholderFromSelection": true, "keepSelectedTextInForm": false};
oDocument.InsertTextForm(oTextFormInsertPr);
 

Text field properties.

Example

Copy code
// Create a text form with the common and specific text form properties:
var oTextFormPr = {"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "First name", "comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false};
var oTextForm = Api.CreateTextForm(oTextFormPr);
 

Specific text field properties.

Type:
  • Object
Properties:
Name Type Description
comb boolean

Specifies if the text field should be a comb of characters with the same cell width. The maximum number of characters must be set to a positive value.

maxCharacters number

The maximum number of characters in the text field.

cellWidth number

The cell width for each character measured in millimeters. If this parameter is not specified or equal to 0 or less, then the width will be set automatically.

multiLine boolean

Specifies if the current fixed size text field is multiline or not.

autoFit boolean

Specifies if the text field content should be autofit, i.e. whether the font size adjusts to the size of the fixed size form.

Example

Copy code
// Create a text form with the specific text form properties:
var oTextFormPrBase = {"comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false};
var oTextForm = Api.CreateTextForm(oTextFormPrBase);
 

Text transform type.

Type:
  • "textArchDown" | "textArchDownPour" | "textArchUp" | "textArchUpPour" | "textButton" | "textButtonPour" | "textCanDown" | "textCanUp" | "textCascadeDown" | "textCascadeUp" | "textChevron" | "textChevronInverted" | "textCircle" | "textCirclePour" | "textCurveDown" | "textCurveUp" | "textDeflate" | "textDeflateBottom" | "textDeflateInflate" | "textDeflateInflateDeflate" | "textDeflateTop" | "textDoubleWave1" | "textFadeDown" | "textFadeLeft" | "textFadeRight" | "textFadeUp" | "textInflate" | "textInflateBottom" | "textInflateTop" | "textPlain" | "textRingInside" | "textRingOutside" | "textSlantDown" | "textSlantUp" | "textStop" | "textTriangle" | "textTriangleInverted" | "textWave1" | "textWave2" | "textWave4" | "textNoShape"

Example

Copy code
// Create a Text Art object with the "textArchUp" text transform type:
var oTextArt = Api.CreateWordArt(oTextPr, "onlyoffice", "textArchUp", oFill, oStroke, 0, 150 * 36000, 50 * 36000);
 

Possible values for the position of chart tick labels (either horizontal or vertical).

  • "none" - does not display the selected tick labels.
  • "nextTo" - sets the position of the selected tick labels next to the main label.
  • "low" - sets the position of the selected tick labels in the part of the chart with lower values.
  • "high" - sets the position of the selected tick labels in the part of the chart with higher values.

Type:
  • "none" | "nextTo" | "low" | "high"

Example

Copy code
// Set the position of the vertical tick labels next to the main vertical label:
oChart.SetVertAxisTickLabelPosition("nextTo");
 

The type of tick mark appearance.

Type:
  • "cross" | "in" | "none" | "out"

Example

Copy code
// Specify the "cross" major tick mark type for the vertical axis:
oChart.SetVertAxisMajorTickMark("cross");
 

Table of contents properties which specify whether to generate the table of contents from the outline levels or the specified styles.

Type:
  • Object
Properties:
Name Type Description
OutlineLvls number

Maximum number of levels in the table of contents.

StylesLvls Array.

Style levels (for example, [{Name: "Heading 1", Lvl: 2}, {Name: "Heading 2", Lvl: 3}]). If StylesLvls.length > 0, then the OutlineLvls property will be ignored.

Example

Copy code
// Add a table of contents which is generated from 9 outline levels to the document:
var oTocBuildFromPr = {"OutlineLvls": 9};
var oTocPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": oTocBuildFromPr, "TocStyle": "standard"};
oDocument.AddTableOfContents(oTocPr);
 

Possible values for the table of contents leader:

  • "dot" - "......."
  • "dash" - "-------"
  • "underline" - "_______"

Type:
  • "dot" | "dash" | "underline" | "none"

Example

Copy code
// Add a table of contents with the dot leader to the document:
var sTocLeader = "dot";
var oTocPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": sTocLeader, "FormatAsLinks": true, "BuildFrom": {"OutlineLvls": 9}, "TocStyle": "standard"};
oDocument.AddTableOfContents(oTocPr);
 

Table of contents properties.

Type:
  • Object
Properties:
Name Type Description
ShowPageNums boolean

Specifies whether to show page numbers in the table of contents.

RightAlgn boolean

Specifies whether to right-align page numbers in the table of contents.

LeaderType TocLeader

The leader type in the table of contents.

FormatAsLinks boolean

Specifies whether to format the table of contents as links.

BuildFrom TocBuildFromPr

Specifies whether to generate the table of contents from the outline levels or the specified styles.

TocStyle TocStyle

The table of contents style type.

Example

Copy code
// Add a table of contents with the specified properties to the document:
var oTocPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": {"OutlineLvls": 9}, "TocStyle": "standard"};
oDocument.AddTableOfContents(oTocPr);
 

Possible values for the table of contents style.

Type:
  • "simple" | "online" | "standard" | "modern" | "classic"

Example

Copy code
// Add a table of contents of the standard style to the document:
var sTocStyle = "standard";
var oTocPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": {"OutlineLvls": 9}, "TocStyle": sTocStyle};
oDocument.AddTableOfContents(oTocPr);
 

Table of contents style levels.

Type:
  • Object
Properties:
Name Type Description
Name string

Style name (for example, "Heading 1").

Lvl number

Level which will be applied to the specified style in the table of contents.

Example

Copy code
// Add a table of contents which is generated from the specified styles to the document:
var aTocStyleLvl = [{Name: "Heading 1", Lvl: 2}, {Name: "Heading 2", Lvl: 3}];
var oTocPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": {"StylesLvls": aTocStyleLvl}, "TocStyle": "standard"};
oDocument.AddTableOfContents(oTocPr);
 

Table of figures properties.

Type:
  • Object
Properties:
Name Type Description
ShowPageNums boolean

Specifies whether to show page numbers in the table of figures.

RightAlgn boolean

Specifies whether to right-align page numbers in the table of figures.

LeaderType TocLeader

The leader type in the table of figures.

FormatAsLinks boolean

Specifies whether to format the table of figures as links.

BuildFrom CaptionLabel | string

Specifies whether to generate the table of figures based on the specified caption label or the paragraph style name used (for example, "Heading 1").

LabelNumber boolean

Specifies whether to include the label and number in the table of figures.

TofStyle TofStyle

The table of figures style type.

Example

Copy code
// Add a table of figures with the specified properties to the document:
var oTofPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": "Figure", "LabelNumber": true, "TofStyle": "distinctive"};
oDocument.AddTableOfFigures(oTofPr);
 

Possible values for the table of figures style.

Type:
  • "simple" | "online" | "classic" | "distinctive" | "centered" | "formal"

Example

Copy code
// Add a table of figures of the distinctive style to the document:
var sTofStyle = "distinctive";
var oTofPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": "Figure", "LabelNumber": true, "TofStyle": sTofStyle};
oDocument.AddTableOfFigures(oTofPr);
 

Twentieths of a point (equivalent to 1/1440th of an inch).

Type:
  • number

Example

Copy code
// Set the distance between columns equal to 36 points:
oParagraph.SetEqualColumns(2, 720);
 

The available text vertical alignment (used to align text in a shape with a placement for text inside it).

Type:
  • "top" | "center" | "bottom"

Example

Copy code
// The inner text for the created shape will be added aligned vertically closer to the shape upper part:
oDrawing.SetVerticalTextAlign("top");
 

The watermark direction.

Type:
  • "horizontal" | "clockwise45" | "counterclockwise45"

Example

Copy code
// The resulting watermark will be rotated clockwise 45 degrees:
var oWatermarkSettings = oDocument.GetWatermarkSettings();
oWatermarkSettings.SetDirection("clockwise45");
 

The watermark type.

Type:
  • "none" | "text" | "image"

Example

Copy code
// The resulting watermark will have the "image" type:
var oWatermarkSettings = oDocument.GetWatermarkSettings();
oWatermarkSettings.SetType("image");
 

Search data type (formulas or values).

Type:
  • "xlFormulas" | "xlValues"

Example

Copy code
// Specify that the values will be searched in the current range:
var oSearchRange = oRange.Find("200", "B1", "xlValues", "xlWhole", "xlByColumns", "xlNext", true);
 

Specifies whether the whole search text or any part of the search text is matched.

Type:
  • "xlWhole" | "xlPart"

Example

Copy code
// Specify that the whole text match will be searched in the current range:
var oSearchRange = oRange.Find("200", "B1", "xlValues", "xlWhole", "xlByColumns", "xlNext", true);
 

Range search direction - next match or previous match.

Type:
  • "xlNext" | "xlPrevious"

Example

Copy code
// Specify that the next text match will be searched in the current range:
var oSearchRange = oRange.Find("200", "B1", "xlValues", "xlWhole", "xlByColumns", "xlNext", true);
 

Range search order - by rows or by columns.

Type:
  • "xlByRows" | "xlByColumns"

Example

Copy code
// Specify that the values will be searched by columns in the current range:
var oSearchRange = oRange.Find("200", "B1", "xlValues", "xlWhole", "xlByColumns", "xlNext", true);
 

Underline type.

Type:
  • "xlUnderlineStyleDouble" | "xlUnderlineStyleDoubleAccounting" | "xlUnderlineStyleNone" | "xlUnderlineStyleSingle" | "xlUnderlineStyleSingleAccounting"

Example

Copy code
// Specify that the single underlining is applied to the current font:
oFont.SetUnderline("xlUnderlineStyleSingle");