Jump to content

How to replace cell values with IronPython?


Funny Cat
Go to solution Solved by Gaia Paolini,

Recommended Posts

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_string

However, 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...