(ExcelExplorer 4.0)
Returns whether hyperlink contains absolute URL or file path.
boolean Absolute( )
Parameters
- None
Description
Returns TRUE if a link contains absolute address, FALSE otherwise.
Worksheet used in the example below:
 |
A |
B |
C |
| 1 |
|
|
|
| 2 |
|
http://www.google.com/ |
|
| 3 |
|
C:\AUTOEXEC.BAT |
|
| 4 |
|
..\..\file.txt |
|
| 5 |
|
mailto:example@example.com?subject=Subject |
|
| 6 |
|
Sheet1!A1 |
|
| 7 |
|
file.xls#Sheet1!A1 |
|
| 8 |
|
\\server\share\file.txt |
|
| 9 |
|
|
|
Print results of Absolute()
<?php
$area = $ee->Worksheet(0)->UsedArea();
if( $area !== false ) {
for( $col = $area->FirstColumn(); $col <= $area->LastColumn(); $col++ ) {
for( $row = $area->FirstRow(); $row <= $area->LastRow(); $row++ ) {
$link = $ee->Cell(0,$col,$row)->Link();
if( $link !== false ) {
echo 'Link in column '.$col.', row '.$row.' is ';
echo $link->Absolute() ? 'absolute' : 'relative';
echo "\n";
}
}
}
}
?>
Will output: Link in column 1, row 1 is absolute
Link in column 1, row 2 is absolute
Link in column 1, row 3 is relative
Link in column 1, row 4 is absolute
Link in column 1, row 5 is relative
Link in column 1, row 6 is relative
Link in column 1, row 7 is absolute
|