Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Spotfire可视化中的表格识别_Python_Spotfire - Fatal编程技术网

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