Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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

In reply to Re^5: Reading Excel file in perl by bitingduck
in thread Reading Excel file in perl by Pauler

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Corion]: Hi marto!
    [marto]: Hey Corion, how are things?
    [Corion]: Fine! It's amazing how productive I can be with a 3hour daily workload removed :)
    [Corion]: My to-do emails level is at a 12-months-low of 21 , from 36 last week ;)

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (11)
    As of 2018-05-24 07:22 GMT
    Find Nodes?
      Voting Booth?