$worksheet1->write(0,1,"Modules", $format);
$worksheet1->write(0,2,"Excel");
$worksheet1->write(0,3, "Dumper");
It gives me this:
Modules Excel Dumper
and when I do this (which is your code)
$worksheet1->write(0,1,"Modules", $format);
$worksheet1->write(1,1,"Excel");
$worksheet1->write(2,1, "Dumper");
I get this:
Modules
Excel
Dumper
I think you just need to watch which index is for row and which is for column.
(EDITED because I misread and got backward what was desired vs. what you were getting)
Another EDIT: and if I do this:
$worksheet1->write(0,0,"A1");
$worksheet1->write(0,1,"B1");
$worksheet1->write(0,2, "C1");
$worksheet1->write(1,0,"A2");
$worksheet1->write(1,1,"B2");
$worksheet1->write(1,2, "C2");
$worksheet1->write(2,0,"A3");
$worksheet1->write(2,1,"B3");
$worksheet1->write(2,2, "C3");
I get:
A1 B1 C1
A2 B2 C2
A3 B3 C3
Where each of the contents is also the name of the cell. Normally you'd do something like that with a nested loop |