Data Tables and their Description

#create html header
html="<table><tr><th>View Name</th><th>View Description</th></tr>"

#loop document data tables and get their description

for t in Document.Data.Tables:
  html += "<tr><td>" + t.Name +"</td><td>"+ t.Properties.GetProperty("Description")+"</td></tr>\n"

#end html

html += "</table>"

#print result to a text area (textArea is can be a blank text area script parameter)
from Spotfire.Dxp.Application.Visuals import HtmlTextArea
textArea.As[HtmlTextArea]().HtmlContent = htmlReport

2 comments:

Roald Dahl said...

This looks like a great code to print the table description in the Text Area. Could you explain how I can use this code to print in the Text Area using an Action Control button?

Jose Leviaguirre said...

#3 Write html into a Text Area
from Spotfire.Dxp.Application.Visuals import HtmlTextArea
textArea.As[HtmlTextArea]().HtmlContent = htmlReport