CellText.String Class (R)
spss.CellText.String(value). Used to specify a string value for a category or a cell in a pivot table. The argument is the string value.
- You can obtain a string representation of a
CellText.String
object using the toString method. For character representations of numeric values stored asCellText.String
objects, such asCellText.String("11")
, you can obtain the numeric value using the toNumber method.
Example
table = spss.BasePivotTable("Table Title",
"OMS table subtype")
rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
row_cat1 = spss.CellText.String("row1")
row_cat2 = spss.CellText.String("row2")
col_cat = spss.CellText.String("col1")
BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,col_cat)
BasePivotTable.SetCellValue(table,list(row_cat1,col_cat),
spss.CellText.String("1"))
BasePivotTable.SetCellValue(table,list(row_cat2,col_cat),
spss.CellText.String("2"))