When I try this:
$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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.