Herschel Gapen Posted June 13, 2019 Share Posted June 13, 2019 Hey I am fairly new to IronPython. I would like to know if there is a way to write a script for an action controlthat allows me to export a table visualization to a .csv. So far I have been able to export my data table via the script below from Spotfire.Dxp.Data.Export import DataWriterTypeIdentifiers from System.IO import File writer = Document.Data.CreateDataWriter(DataWriterTypeIdentifiers.ExcelXlsDataWriter) table = Document.ActiveDataTableReference #OR pass the DataTable as parameter filtered = Document.ActiveFilteringSelectionReference.GetSelection(table).AsIndexSet() #OR pass the filter stream = File.OpenWrite("FILEPATH/FILENAME.csv") names = [] for col in table.Columns: names.append(col.Name) writer.Write(stream, table, filtered, names) stream.Close() How do I change this so I can export a table visualization and not my data table Link to comment Share on other sites More sharing options...
Sayali Patil Posted July 2, 2019 Share Posted July 2, 2019 Hello, Here is a python script you can use as a reference to export the table plot visualization- http://easyspotfire.blogspot.com/2014/04/export-table-visualization-to-file.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now