Hi Guys,
I have a question about using php5 the 'new COM("excel.application")'
function to modify an existing (pre-formated) excel template.
I can open the template and read and write to it just fine.
what i'm trying to do is select a single formated row and then
do an insert to expanded the number of formated rows.
for example if my template has 3 formated rows, but I have
5 items to stick in there, then i would need to select 1 of the formated rows, and then do an insert twice
giving me my 5 formated rows.
I can do a Select and then Insert and it does shift the
rows down, but it does not carry over the formulas.
I need to do more of an insert row, and then copy and past_special -> All or something like that.
I'm trying to search for any good documentation that
covers what methods are available.
Here's a code sample of what i have.
I tried $cell->EntireRow->Paste or PasteSpecial
it always gives a COM exception. it doesn't know what Paste
is.
Thanks in advance for any suggestions.
I have a question about using php5 the 'new COM("excel.application")'
function to modify an existing (pre-formated) excel template.
I can open the template and read and write to it just fine.
what i'm trying to do is select a single formated row and then
do an insert to expanded the number of formated rows.
for example if my template has 3 formated rows, but I have
5 items to stick in there, then i would need to select 1 of the formated rows, and then do an insert twice
giving me my 5 formated rows.
I can do a Select and then Insert and it does shift the
rows down, but it does not carry over the formulas.
I need to do more of an insert row, and then copy and past_special -> All or something like that.
I'm trying to search for any good documentation that
covers what methods are available.
Here's a code sample of what i have.
Code:
$cell=$sheet->Cells("5","A");
$cell->Activate;
$cell->EntireRow->Select;
for($a=0; $a<5; $a++){
$cell->Offset(1, 0)->EntireRow->Insert;
}
it always gives a COM exception. it doesn't know what Paste
is.
Thanks in advance for any suggestions.