I want to detect whether any hyperlink is associated with a cell value in an excel file.How can i accomplish this?
I used Spreadsheet::ParseExcel::Cell and its method $cell->type() but it returns only text for a hyperlink.Is there any other method to detect its style?
use Spreadsheet::XLSX; use Spreadsheet::ParseExcel; my $excel = Spreadsheet::XLSX -> new ('Sample.xlsx'); foreach my $sheet (@{$excel -> {Worksheet}}) { printf("Sheet: %s\n", $sheet->{Name}); $sheet -> {MaxRow} ||= $sheet -> {MinRow}; foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { $sheet -> {MaxCol} ||= $sheet -> {MinCol}; foreach my $col ($sheet -> {MinCol} .. $sheet -> {MaxCol} +) { my $cell = $sheet -> {Cells} [$row] [$col]; if ($cell) { printf("( %s , %s ) => %s\n", $row, $col, $cel +l -> {Val}); my $type=$cell->type(); print $type."\n"; } } } }
In reply to detect hyperlink in an excel file by mouleeshmichael
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |