http://qs321.pair.com?node_id=1231207


in reply to How to modify column in WriteExcel?

A useful tool in such a situation is Data::Dumper to investigate your data structures. For example you might want to try:

use Data::Dumper; ... print Dumper $url;

Replies are listed 'Best First'.
Re^2: How to modify column in WriteExcel?
by vserzh (Novice) on Mar 13, 2019 at 10:27 UTC
    As I understand I get exactly what I need, but.. :)
    $VAR1 = [ [ '10000516' ], [ '10000512' ], [ '10000514' ], [ '10000513' ], [ '10000515' ] ];
      #!perl use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new('Report.xls'); my $worksheet = $workbook->add_worksheet("DTicket"); #my $url = $sth->fetchall_arrayref([0]); my $url = [['10000516'],['10000512'], ['10000514'],['10000513'],['10000515']]; my $rowno = 2; for my $row (@$url ){ my $url = 'http://example.com/index.pl?TNumber='.$row->[0]; $worksheet->write_url($rowno++,0, $url, $row->[0]); }
      poj
        It's works thank you very match!

      If this is the output of print Dumper $url; then you need to use $url->[0][0] instead of $url->[0] (the latter being the same as ${$url}[0]).

      Update: or ${${$url}[0]}[0] if you prefer.

        Yes, that output and thank you $url->[0][0] is works, link are valid now. Could you explain me why is two pointers here [0][0]? And another question can I use for/foreach to modify every row in that column?