toString -Methode (Python)
Diese Methode wird zum Abrufen einer Zeichenfolgedarstellung eines CellText.String -oder CellText.Number -Objekts verwendet. Von dieser Methode abgerufene Werte können in Zeichenfolgeausdrücken verwendet werden. Sie rufen diese Methode für ein CellText.String -oder CellText.Number -Objekt auf.
Beispiel
from spss import CellText
table = spss.BasePivotTable("Table Title",
"OMS table subtype")
table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")
row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")
table[(row_cat1,col_cat1)] = CellText.String("abc")
cellValue = table[(row_cat1,col_cat1)].toString()
table[(row_cat2,col_cat2)] = CellText.String(cellValue + "d")
table[(row_cat1,col_cat1)].toString()gibt eine Zeichenfolgedarstellung des ObjektsCellTextzurück (daran erinnern, dass Tabellenzellen alsCellText-Objekte gespeichert sind) für die Zelle mit Kategoriewerten("first row","first column").