excel COM code example won't work....
| From: | Jeff D. Hamann | Date: | Wed, 10 Jul 2002 22:12:01 +0000 |
| Subject: | excel COM code example won't work.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106965@lists.php.net to get a copy of this message | ||
I've been trying to get the follwing example to work and it just doesn't
seem to be able to handle php variables in some of the excel com function
args, like:
/* start entering data into the cells */
for( $i = 0; $i < 10; $i++ )
{
$var_i = new Variant($i,VT_I4);
echo $i. "<br>";
echo $var_i->value. "<br>";
$cell = $sheet->Cells( $i, 1 ); /* this gags, but */
$cell = $sheet->Cells( 1, 1 ); /* this works fine */
$cell->Activate();
$cell->Value = $i; /* this works */
}
Is there something I'm missing or is this really touchy like trying to do
automation a few years ago?
Jeff.
--
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
jeff_hamann@hamanndonald.com
www.hamanndonald.com