Python Spotfire可视化中的表格识别
我试图使用脚本确定数据表可视化所指的是哪个表。我不想依赖名称,以防有人更改它,并且它不再反映数据表。有办法做到这一点吗?我已经包括了在页面和可视化中循环的代码,并以这种类型到达那里Python Spotfire可视化中的表格识别,python,spotfire,Python,Spotfire,我试图使用脚本确定数据表可视化所指的是哪个表。我不想依赖名称,以防有人更改它,并且它不再反映数据表。有办法做到这一点吗?我已经包括了在页面和可视化中循环的代码,并以这种类型到达那里 for d in Document.Pages: Document.ActivePageReference=d for visual in Document.ActivePageReference.Visuals: print visual.TypeId
for d in Document.Pages:
Document.ActivePageReference=d
for visual in Document.ActivePageReference.Visuals:
print visual.TypeId
#here I would like to print the table that is being referred to if it is data table visualization
感谢您的帮助这应该会得到数据表的名称
from Spotfire.Dxp.Application.Visuals import VisualContent
for d in Document.Pages:
Document.ActivePageReference=d
for visual in Document.ActivePageReference.Visuals:
if visual.TypeId.Name<>'Spotfire.HtmlTextArea':
#Spotfire.HtmlTextArea don't have data tables
vis=visual.As[VisualContent]()
print vis.Data.DataTableReference.Name
从Spotfire.Dxp.Application.Visuals导入VisualContent
对于文件中的d,第页:
Document.ActivePageReference=d
对于Document.ActivePageReference.Visuals中的可视内容:
如果visual.TypeId.Name'Spotfire.HtmlTextArea':
#Spotfire.HtmlTextArea没有数据表
vis=可视。如[可视内容]()
打印vis.Data.DataTableReference.Name