Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

List table columns

# Replace with the actual table name
table_name = "Data Table"  

# Get the table by name
table = Document.Data.Tables[table_name]

# Iterate through the columns and add their names to the list
for column in table.Columns:
print (column.Name)


# Iterate through all columns and add their column names and data types
for t in Document.Data.Tables:
   print t.Name
   columnCollection=t.Columns
   for col in columnCollection:
      print "\t", col.Name, "(",col.Properties.DataType,")"






No comments: