|
Dear all,
I'm basically trying to hide all captions from all selected pivot tables in the viewer. As long as I don't select too many tables, the following seems to work fine:
begin program.
import SpssClient
SpssClient.StartClient()
outputDoc = SpssClient.GetDesignatedOutputDoc()
outputItems = outputDoc.GetOutputItems()
for index in range(outputItems.Size()):
outputItem = outputItems.GetItemAt(index)
if outputItem.GetType() == SpssClient.OutputItemType.PIVOT and outputItem.IsSelected():
pivotTable = outputItem.GetSpecificType()
pivotTable.HideCaption()
SpssClient.StopClient()
end program.
However, when I select a lot of tables, it works only partially. At some point it crashes with the error:
Traceback (most recent call last):
File "<string>", line 9, in <module>
_SpssClient.SpssClientException: (16621, 'An error occured in SPSS Statistics Viewer.', '')
Is there any way in which I can make this work?
Thanks in advance,
Ruben
|