This article provides a script on how to get/set the custom format of a column with Integer or Real data type
Introduction
This article provides a script on how to get/set the custom format of a column with Integer or Real data type
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Data import * from Spotfire.Dxp.Data.Formatters import * dataTable=Document.Data.Tables["tableName"] column = dataTable.Columns["columnName"] #Get the Real data type Column's formatter. This is an NumberFormatter formatter = column.Properties.Formatter print formatter.FormatString #To change the format string newFormatter=formatter.Clone() newFormatter.FormatString="#.#" #set the newformatter column.Properties.Formatter=newFormatter
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.