stevegr has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get some information from SPSS using Win32::OLE. My problem is you need to pass a variant array of strings to the function, which is filled and returned. I'm using the following code:
This code works OK in SPSS Basic. In Perl the GetVariableColumnWidths function succeeds (LastError = 0 and $nvars returns the correct value) but nothing is returned in $cwidths.use Win32::OLE; $spssapp = Win32::OLE->GetActiveObject('SPSS.Application'); $data = $spssapp->Documents()->GetDataDoc(0); my $nvars = $data->GetVariableColumnWidths($cwidths);
I've experimented with creating $cwidths with Win32::OLE::Variant first using all of the following
none of which work. Can anyone help?my $cwidths = Variant(VT_BTSR | VT_ARRAY, ""); my $cwidths = Variant(VT_BTSR | VT_ARRAY | VT_BYREF, ""); my $cwidths = Variant(VT_VARIANT | VT_ARRAY, ""); my $cwidths = Variant(VT_VARIANT | VT_ARRAY | VT_BYREF, "");
Thanks,
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32
by BrowserUk (Patriarch) on Oct 11, 2002 at 02:02 UTC | |
by stevegr (Initiate) on Oct 11, 2002 at 02:36 UTC |