dimmesdale has asked for the wisdom of the Perl Monks concerning the following question:
the code looks like this
my ($rest,$imc); for my $i (0..$Groups+1) { for my $j (15*($i+1)-$Conds..15*($i+1)) { $avg->Range(xl_rowcol_to_cell($j-1,2*$Meas+5))->Select(); $rest = 2*$Meas+4; $imc = 2*$Meas+3; $Xl->ActiveCell->{Value} = "=ABS(RC[-$rest]-RC[-$imc])"; $avg->Range(xl_rowcol_to_cell($j-1,2*$Meas+6))->Select(); $rest = 2*$Meas+3; $imc = 2*$Meas+2; $Xl->ActiveCell->{Value} = "=Abs(RC[-$rest]-RC[-$imc])"; if($i == 0) { $avg->Range(xl_rowcol_to_cell($j-1,2*$Meas+7))->Select(); $rest = 2*$Meas+2; $imc = 2*$Meas+1; $Xl->ActiveCell->{Value} = "=Abs(RC[-$rest]-RC[-$imc])"; } } }
I get a long line of these:
OLE exception from "Microsoft Excel": Unable to get the Select property of the Range class Win32::OLE(0.1502) error 0x800a03ec in METHOD/PROPERTYGET "Select" at dyna.pl line 281 OLE exception from "Microsoft Excel":
Anything wrong with the code? ($Xl is an excel object made with Win32::OLE->new, $avg is a worksheet--I write on it elsewhere/do some formatting and it works, so I know that isn't the problem)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unable to get the select property of the range class...
by jsprat (Curate) on Jul 30, 2002 at 18:55 UTC | |
by dimmesdale (Friar) on Jul 30, 2002 at 19:14 UTC |