Data table column and row counts
/Description: Get a count of columns and rows in a data table.
Assumptions: An optional 'myTable' data table type script parameter.
#Pick one of the following data table reference methods: #myTable = Application.Document.Data.Tables['MyDataTable'] #Name method #myTable = Application.Document.ActiveDataTableReference #Active data table method #myTable = Application.Document.Data.Tables.DefaultTableReference #Default data table method #myTable as a data table type script parameter #Script parameter method rowCount = myTable.RowCount #Get a count of rows columnCount = myTable.Columns.Count #Get a count of columns print columnCount, rowCount