Funny Cat Posted October 6, 2023 Share Posted October 6, 2023 I'm trying to modify cell values of a data table based on a marking with an IronPython script.from Spotfire.Dxp.Data import * dataTable = Document.Data.Tables["myTable"]cursor = DataValueCursor.CreateFormatted(dataTable.Columns["myColumn"])markings = Document.ActiveMarkingSelectionReference.GetSelection(dataTable) some_string = "some_string" for row in dataTable.GetRows(markings.AsIndexSet(),cursor): cursor.CurrentValue = some_stringHowever, when I want to assign the string to the cursor.CurrentValue, I'm getting AttributeError: can't assign to read-only property CurrentValue of type 'DataColumnValueCursor[str]'Is there a way how to achieve this? Link to comment Share on other sites More sharing options...
Solution Gaia Paolini Posted October 9, 2023 Solution Share Posted October 9, 2023 see my reply on stack overflow https://stackoverflow.com/questions/77244449/spotfire-ironpython-replacing-data-table-values Link to comment Share on other sites More sharing options...
Funny Cat Posted October 9, 2023 Author Share Posted October 9, 2023 Thank you very much Gaia, that works perfectly! 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