The example script shown below displays the exact sequence of columns as present in the table.
#########################################
from Spotfire.Dxp.Application import *
from Spotfire.Dxp.Application.Visuals import *
tablePlot = vis.As[TablePlot] ()
for col in tablePlot.TableColumns:
print col.Name
#########################################
Disclaimer:The script code in this article is only a sample to be used as a reference. It is not intended to be used "As Is" in a Production environment. Always test in a Development environment. Make modifications to the script in accordance with your implementation specifications that best suit your business requirements. Refer to the API reference(s) cited in this article for usage of the classes and methods used in the script.