Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Workbook

Hierarchy

  • Workbook

Index

Properties

activeCustomView

activeCustomView: CustomView | undefined

Gets the currently active custom view, or undefined if no custom view is active.

activeSheet

activeSheet: Sheet

Gets the currently active sheet (the active tab).

name

name: string

Gets the name of the workbook saved to the server. Note that this is not necessarily the file name.

publishedSheetsInfo

publishedSheetsInfo: Array<SheetInfo>

Note that this is synchronous, meaning that all of the sheets are expected when loaded.

Methods

activateSheetAsync

  • activateSheetAsync(sheetNameOrIndex: string | number): Promise<Sheet>
  • Activates the sheet, either by name or index, and returns a promise of the sheet that was activated.

    Parameters

    • sheetNameOrIndex: string | number

    Returns Promise<Sheet>

changeParameterValueAsync

  • changeParameterValueAsync(name: string, value: string | number | boolean | Date): Promise<Parameter>
  • Modifies the given parameter and assigns it a new value. The new value must fall within the domain restrictions defined by allowableValues. If the domain restriction is ParameterValueType.Range, be sure to check the allowableValues before assigning a new value. If the new value is out of range, the updated value will be set to either the minValue or the maxValue of the allowable range. If a step size is also specified and the new value does not fall on the step intervals, the updated value will be set to the closest, lower step, or closest, earlier date. If the domain restriction is type ParameterValueType.List, and there are aliases defined for the list, the aliased value should be passed to the method.

    Parameters

    • name: string

      The name of the parameter

    • value: string | number | boolean | Date

      The new value to assign to this parameter. Note: For changing Date parameters, UTC Date objects are expected.

    Returns Promise<Parameter>

    The updated Parameter. The promise is rejected if name or value is invalid. However, if the domain restriction is type AllowableValuesType.Range, and the value is out of the range bounds, the parameter gets set to the minValue or the maxValue of the range (whichever is closer). If the range has a stepSize or dateStepPeriod, the parameter gets set to the closest, lower step, or the closest, earlier date.

getCustomViewsAsync

  • getCustomViewsAsync(): Promise<Array<CustomView>>
  • Gets the collection of CustomView objects associated with the workbook.

    Returns Promise<Array<CustomView>>

getParametersAsync

  • getParametersAsync(): Promise<Array<Parameter>>
  • Returns Promise<Array<Parameter>>

    A collection of all the Tableau parameters that are used in this workbook.

removeCustomViewAsync

  • removeCustomViewAsync(customViewName: string): Promise<CustomView>
  • Removes the named custom view.

    Parameters

    • customViewName: string

    Returns Promise<CustomView>

revertAllAsync

  • revertAllAsync(): Promise<void>
  • Reverts the workbook to its last saved state.

    Returns Promise<void>

saveCustomViewAsync

  • saveCustomViewAsync(customViewName: string): Promise<CustomView>
  • Saves the current state of the workbook by assigning a custom view name.

    Parameters

    • customViewName: string

    Returns Promise<CustomView>

setActiveCustomViewAsDefaultAsync

  • setActiveCustomViewAsDefaultAsync(): Promise<void>
  • Sets the active custom view as the default. If there is no active custom view, the default view is the original view.

    Returns Promise<void>

showCustomViewAsync

  • showCustomViewAsync(customViewName: string): Promise<CustomView>
  • Changes the visualization to show the named saved state. workbook.showCustomViewAsync("Awesome" ).then(function() { // do something }); To reset a custom view to the original view, pass in a null value for the customViewName parameter. workbook.showCustomViewAsync().then(function() { // do something });

    Parameters

    • customViewName: string

    Returns Promise<CustomView>