Check that Spotfire document has a Page using Python
Just use this simple Python function:
def has_page(page_name):
for page in Document.Pages:
if page.Title == page_name:
return True
Try it:
print(has_page("Page")) # True
print(has_page("Page (2)")) # True
print(has_page("SomePage")) # True
print(has_page("PageNotExists")) # None
See more about Spotfire on GitHub
Xantorohara, 2017-08-30, Spotfire 7.8.0
No comments:
Post a Comment