Export a table visualization to a file


 1
2
3
4
5
6
7
8
9
10
11
12
from System.IO import Path, File, StreamWriter
from Spotfire.Dxp.Application.Visuals import TablePlot

#Temp file for storing the table data
tempFolder = Path.GetTempPath()
tempFilename = Path.GetTempFileName()

#Export table data to the temp file
writer = StreamWriter(tempFilename)
vTable.As[TablePlot]().ExportText(writer)

print tempFilename

Input
vTable (Visualization)

Not suitable for use over the web since the local file system is used.