Skip to main content

numColumns

Returns the number of columns in your table.

The function works on the whole table (your uploaded sample data). You can't input a table region.

The function does not count the row names column — see the examples for guidance.

Note

Available in "Describe the Table" and "Describe Row in Context" projects only.

Parameters

  • NONE

Examples

Assume a project with this sample data:

ID

Branch

State

Manager

Sales

Row 1

1001

Pittsburgh

Pennsylvania

Andrew Gray

478,745.37

Row 2

1002

Boston

Massachusetts

Emma Moore

329,493.49

Row 3

1003

Los Angeles

California

Linda Barclay

467,359.45

Row 4

1004

Chicago

Illinois

Camilla Scott

463,603.17

Note

The first column — ID in the table above — contains the row names.

To get the number of columns, call the function with zero parameters.

ATL in Script

Result

Note

[[numColumns()]]

4

The row names column (ID) is not counted.

[[numColumns() + 1]]

5

Use this ATL to get a count that includes the row names column.