Using COM with Excel

I’m having a hard time “targeting” the row within an Excel file I’ve managed to create using COM. I thought it would be the following:
$cell->Rows(1,1)->RowHeight = “51”;

…but it didn’t work, nor did various other attempts…

What’s a basic procedure (using PHP 5) to change a row’s height value prior to write out? Here’s what I have so far:


...
$sheet->activate;
$cells=$sheet->Range('A1','C1')->Merge;
$cell=$sheet->Cells(1,1);
$cell->value = $name;
$cell->WrapText = "True";
Rows(1)->RowHeight = 51.75;//something wrong...

Any help with this is appreciated.

So I managed to find the solution (albeit possibly inefficient, etc.):

$column_a->ColumnWidth = '2';

Where $column_a is a Range of cells. If anyone has a better way of doing this, however, by all means…

So anyway, I guess my original code was correct? I think something that occurred in doing this for me had to do with how messy the memory management was / is for using PHP and Excel. I noticed in my Taskmanager that I had MANY instances of Excel running and when I would go to “refresh” my page, it would nosedive. After eliminating those erroneous instances, it then seemed to work…

Now I just need to know how to center text horizontally in a cell. Anyone?