kulls has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
Can anyone suggest me How do I include the hyperlink data through write_row() method ?
Here is my sample code .
#!/usr/bin/perl use strict; use warnings; use Spreadsheet::WriteExcel::Simple; my $ss = Spreadsheet::WriteExcel::Simple->new; my @arr = ( '123', "<a href='sample.com'>Sample</a>", 900 ); $ss->write_row(\@arr); exit;
- Raja

Replies are listed 'Best First'.
Re: SpredSheet::WriteExcel - write_row () Method
by Anonymous Monk on Jun 30, 2009 at 12:40 UTC
      Hi,

      Thanks.
      If I need to use  write_url(), then I need to go through the index one by one.

      Is there any keywords like "external:" which I can specify along with the data ?
      - Raja
Re: SpredSheet::WriteExcel - write_row () Method
by tmaly (Monk) on Jun 30, 2009 at 14:35 UTC

    I agree write_url is the way to go. You can do something like

     $worksheet->write_url($row,$col,'http://perlmonks.org','Perl Monks');
Re: SpredSheet::WriteExcel - write_row () Method
by jmcnamara (Monsignor) on Jul 01, 2009 at 17:54 UTC

    If you switch to using Spreadhsheet::WriteExcel instead of ::Simple (or else just call the parent class methods) you can use the add_write_handler() method to modify the behaviour of write() and and write_row().

    Other than that the best way is to unroll the loop as suggested by the other posters.

    --
    John.