AddFields

function AddFields(
  options: object = null,
  options.rows: number | string | number[] | string[] = null,
  options.columns: number | string | number[] | string[] = null,
  options.pages: number | string | number[] | string[] = null,
  options.addToTable: boolean = null,
): void

Description

Adds row, column, and page fields to a PivotTable report.

Parameters

optionsobjectdefault: null
options.rowsnumber | string | number[] | string[]default: null

Specifies an array of field names or ids to be added as rows or added to the category axis.

options.columnsnumber | string | number[] | string[]default: null

Specifies an array of field names or ids to be added as columns or added to the series axis.

options.pagesnumber | string | number[] | string[]default: null

Specifies an array of field names or ids to be added as pages or added to the page area.

options.addToTablebooleandefault: null

Applies only to PivotTable reports. True to add the specified fields to the report (none of the existing fields are replaced). False to replace existing fields with the new fields. The default value is False.

Returns

void

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).