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

hi monks, I am trying to read the value of a hyperlink in an excel sheet. This is what i am doing,
for my $row($excel_configs->{custom_api_seq_sheet}{start_row}...$excel +_configs->{custom_api_seq_sheet}{end_row}-2){ foreach my $col (1..$excel_configs->{custom_api_seq_sheet} +{end_col} -1){ if($Sheet->Cells($row,$col)->{'Value'} eq Link){ print $Sheet->Cells($row,$col)->Hyperlinks()->Addr +ess."\n"; $api_table->{$api_count}{$table_order->{$col}} = $ +Sheet->Cells($row,$col)->Hyperlinks->{Address}; }
But it doesnt seem to work. Can anyone help me please??

Replies are listed 'Best First'.
Re: reading hyperlink value using win32 ole
by ww (Archbishop) on Jan 29, 2011 at 12:27 UTC
    This question could be improved.
    • What spreadsheet module are you using?
      • if it's jmcnamara's Spreadsheet-ParseExcel simply reading the docs for v. 0.58 would tell you that adding Hyperlink support is a "TODO"
      • So too, in Spreadsheet-ParseExcel-0.2603
      • OTOH, albeit with reference to writing, not reading, "the  Spreadsheet::WriteExcel Perl module can be used to create a cross-platform Excel binary file. Multiple worksheets can be added to a workbook and formatting can be applied to cells. Text, numbers, formulas, hyperlinks (emphasis supplied), images and charts can be written to the cells."
    • What does "doesn't seem to work" mean?
          If you're seeing error messages, pray tell; if not, explain
    • Is there any reason to question your data -- content, encoding, existence?

    Please, help us to help you.

Re: reading hyperlink value using win32 ole
by davies (Monsignor) on Jan 29, 2011 at 13:49 UTC

    Something very like this was discussed recently in detect hyperlink in an excel file. There was no definitive answer, but you might find useful information in that thread.

    Regards,

    John