[英]Identify table in visualization in Spotfire
我正在尝试使用脚本识别数据表可视化所指的表。 我不想依赖名称,以防有人更改它并且它不再反映数据表。 有没有办法做到这一点? 我已经包含了循环浏览页面和可视化并到达那里的代码。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.