NiemannLouise / php-excel-reader

Automatically exported from code.google.com/p/php-excel-reader
0 stars 0 forks source link

function hyperlink doesn't resolve column #158

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to get a hyperlink and ask for column "a". You will receive an error 
that the index doesn't exists.

Issue is that the hyperlink function should resolve the column as well or 
performs some additional check if it's a resolved column or a clear column.

Documentation doesn't reflect.

Solution is to add the following to line #384:

$col = $this->getCol($col);

.. and it will work. The (raw) and (type) functions have probably the same 
issue.

Here is an easy fix how to make it even better:

$col = is_numeric($col)?$col:$this->getCol($col);  

Which is a dual approach. Now the programmer can either give a numeric value or 
a named value.

Hope that helps!

Thanks,

Andy

Original issue reported on code.google.com by flyand...@gmail.com on 31 Oct 2012 at 10:23