ApiPivotDataField

class ApiPivotDataField extends ApiPivotField

Description

Class representing a PivotTable data field.

Instance Methods

Remove()

Removes data field from category.

Move(type, index)

Moves field inside category.

SetFunction(func)

Sets the function performed in the data field.

GetFunction(): DataConsolidateFunctionType

Returns the function performed in the data field.

GetPosition(): number

Returns a value that represents the position of the field in category.

SetPosition(position)

Sets a value that represents the position of the field in dataField category.

GetOrientation(): PivotFieldOrientationType

Returns a data field orientation value that represents the location of the field in the specified PivotTable report.

GetValue(): string

Returns a value representing the name of the object.

SetValue(name)

Sets a value representing the name of the object.

GetCaption(): string

Returns a value that represents the label text for the data field.

SetCaption(caption)

Set value that represents the label text for the pivot field.

GetName(): string

Returns a value representing the name of the object.

SetName(name)

Sets a value representing the name of the object.

GetNumberFormat(): string | "null"

Returns a value that represents the format code for the object.

SetNumberFormat(format)

Sets value that represents the format code for the object.

GetIndex(): number

Returns index of the data field.

GetPivotField(): ApiPivotField

Returns the pivotField from which the data field was created.

ClearAllFilters()

Calling this method deletes all filters currently applied to the PivotField.

ClearLabelFilters()

This method deletes all label filters or all date filters in the PivotFilters collection.

ClearManualFilters()
ClearValueFilters()

Calling this method deletes all value filters in the PivotFilters collection of the PivotField.

GetPivotItems(index)

Returns an object that represents either a single PivotTable item (a PivotItem object) or a collection of all the visible and hidden items (a PivotItems object) in the specified field.

SetOrientation(type)

Sets a pivot field orientation value that represents the location of the field in the specified PivotTable report.

GetSourceName()

Returns source name

GetTable()

Returns ApiPivotTable.

GetParent()

Returns parent object to this field.

GetLayoutCompactRow()

Returns whether or not a PivotField is compacted.

SetLayoutCompactRow(compact)

Sets whether or not a PivotField is compacted.

GetLayoutForm()

Returns the way the specified PivotTable items appear—in table format or in outline format.

SetLayoutForm(type)

Sets the way the specified PivotTable items appear—in table format or in outline format.

GetLayoutPageBreak()

Returns the flag that represents page break is inserted after each field.

SetLayoutPageBreak(insert)

Sets the flag that represents page break is inserted after each field.

GetShowingInAxis()

Returns if the PivotField is currently visible in the PivotTable or not.

GetRepeatLabels()

Returns setting repeat items labels at each row.

SetRepeatLabels(repeat)

Sets setting repeat items labels at each row.

GetLayoutBlankLine()

Returns setting insert blank rows after each item.

SetLayoutBlankLine(insert)

Sets setting insert blank rows after each item.

GetShowAllItems()

Returns setting show items with no data.

SetShowAllItems(show)

Sets setting show items with no data.

GetLayoutSubtotals()

Returns setting show subtotals.

SetLayoutSubtotals(show)

Set setting show subtotals.

GetLayoutSubtotalLocation()

Returns setting layout subtotal location.

SetLayoutSubtotalLocation(type)

Sets setting layout subtotal location.

GetSubtotalName()

Returns the text string label displayed in the subtotal column or row heading in the specified PivotTable report.

SetSubtotalName(caption)

Sets the text string label displayed in the subtotal column or row heading in the specified PivotTable report.

GetSubtotals()

Returns object that represent all subtotals.

SetSubtotals(subtotals)

Sets Subtotals.

GetDragToColumn()

Returns the specified field, can be dragged to the column position or not.

SetDragToColumn(flag)

Sets the specified field, can be dragged to the column position or not.

GetDragToRow()

Returns the specified field, can be dragged to the row position or not.

SetDragToRow(flag)

Sets the specified field, can be dragged to the row position or not.

GetDragToData()

Returns the specified field, can be dragged to the data position or not.

SetDragToData(flag)

Sets the specified field, can be dragged to the data position or not.

GetDragToPage()

Returns the specified field, can be dragged to the page position or not.

SetDragToPage(flag)

Sets the specified field, can be dragged to the page position or not.

GetCurrentPage()

Returns the current page showing for the page field (valid only for page fields).

Instance Properties

FunctionDataConsolidateFunctionType

Returns the function performed in the data field.

Positionnumber

Returns a value that represents the position of the field in category.

OrientationPivotFieldOrientationType

Returns a data field orientation value that represents the location.

Namestring

Returns a value representing the name of the object.

Valuestring

Returns a value representing the value of the object.

Captionstring

Returns a value that represents the label text for the data field.

NumberFormatstring | "null"

Returns a value that represents the format code for the object.

Indexnumber

Returns index of the data field.

PivotFieldApiPivotField

Returns the pivotField from which the data field was created.

Extends

ApiPivotField

Class representing a PivotTable field.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).