Rick Phelan 2 Posted November 6, 2020 Share Posted November 6, 2020 I have created added columns via IronPython and it works well. When I try to delete the columns via IronPython it seems to work, but when I look at the data canvas it still shows the added columns and one has to manually delete them. Is there a way to delete the added column object in data canvas in IronPython Below is the code I am using to delete the columns by name. I will attach a screen shot showing the added columns in data canvas even though they do not exist in the table anymore. "from Spotfire.Dxp.Data import * from System.Collections.Generic import List dt = Document.Data.Tables["Sheet"] columnsToDelete = List[DataColumn]() for column in dt.Columns: if column.Name == 'Cum_Prod': columnsToDelete.Add(column) if columnsToDelete.Count != 0: dt.Columns.Remove(columnsToDelete)" Link to comment Share on other sites More sharing options...
Sasidhar Kandukuri Posted December 4, 2023 Share Posted December 4, 2023 @SCRIBE System User Is there a way to refresh Data Canvas when removing the added columns using ironpython script. I have similar problem and couldnt find answer 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