SpssDataDoc Class (Python)
The SpssDataDoc class represents an open dataset.
Example: Obtaining the Active Dataset
import SpssClient
SpssClient.StartClient()
ActiveDataDoc = SpssClient.GetActiveDataDoc()
- The variable ActiveDataDoc is an SpssDataDoc object for the active dataset.
Example: Obtaining the First Opened Dataset
import SpssClient
SpssClient.StartClient()
DataDocsList = SpssClient.GetDataDocuments()
FirstDataDoc = DataDocsList.GetItemAt(0)
- SpssClient.GetDataDocuments() returns a DataDocsList object, which provides access to all open datasets.
- The GetItemAt method from the DataDocsList class is used to get the dataset with index 0 (the first opened dataset) from the list of open datasets. The variable FirstDataDoc is an SpssDataDoc object for this dataset.