Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: Reading Excel file in perl

by bitingduck (Chaplain)
on Nov 10, 2012 at 08:01 UTC ( [id://1003237]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Reading Excel file in perl
in thread Reading Excel file in perl

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

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1003237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2024-04-23 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found