[英]Remove/ delete or hide column in spotfire
How to remove/delete or hide column using iron script in spotfire ? 如何在Spotfire中使用铁脚本删除/删除或隐藏列?
For adding a column i have done as follows: 为了添加一列,我做了如下操作:
` `
curDT = Document.ActiveDataTableReference
cols = curDT.Columns
# targetCol = Document.Properties["myColumnSelection"]
#Create a new column that counts the comma delimiter
myExpression = '1+len(RXReplace([Cx],"([A-Za-z0-9]+)","","g"))'
myNewColName = cols.CreateUniqueName("NumElements")
cols.AddCalculatedColumn(myNewColName, myExpression)
` `
if it can still be helpful: 如果仍然有帮助:
from Spotfire.Dxp.Application.Visuals import VisualContent
contentTable = myTableVisualization.As[VisualContent]()
if contentTable.TableColumns.Contains(myData.Columns["MyColumn"]):
contentTable.TableColumns.Remove(myData.Columns["MyColumn"])
Remove a column by 删除列
cols.Remove("NameOfColumnToRemove") cols.Remove(“ NameOfColumnToRemove”)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.