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??
Hey thanks... I tried as per ur suggestion. But i tried 2 prgs, one for write to excel and another for read excel. I have the below code for write to excel:
#!/sbcimp/run/pd/csm/32-bit/perl/5.14.2/bin/perl use lib qw(/sbcimp/run/pd/csm/32-bit/cpan/5.14.2-2012.03/lib); use strict; use Spreadsheet::WriteExcel; # Create a new Excel file my $FileName = "/home/dujne/ptice/port.xls"; my $workbook = Spreadsheet::WriteExcel->new($FileName); # Add a worksheet my $worksheet1 = $workbook->add_worksheet('PERL'); # Define the format and add it to the worksheet my $format = $workbook->add_format( center_across => 1, bold => 1, size => 10, border => 4, color => 'black', bg_color => 'cyan', border_color => 'black', align => 'vcenter', ); # Change width for only first column $worksheet1->set_column(0,0,20); # Write a formatted and unformatted string, row and column # notation. $worksheet1->write(0,0, "PERL FLAVOURS", "Modules",$format); $worksheet1->write(1,0,"Active State PERL"); $worksheet1->write(2,0,"Strawberry PERL"); $worksheet1->write(3,0,"Vennila PERL" );
The above code runs fine. I m trying to update the next column and add the details next to the column. I have the below code,
$worksheet1->write(0,1,"Modules", $format); $worksheet1->write(1,1,"Excel"); $worksheet1->write(2,1, "Dumper");
bt this code adds 3 different columns, i wanted as Column B as Modules, and below this column i need 2 rows as 1)Excel & 2) Dumper Something like below is needed::
MODULES Excel Dumper
But with my code i see the below
MODULES Excel Dumper
Can someone let me know whats wrong in the avove code??? Or how can i add 3 by 3 cells?

In reply to Re^4: Reading Excel file in perl by Pauler
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
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (2)
    As of 2018-05-26 10:40 GMT
    Find Nodes?
      Voting Booth?