You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/09/12 13:53:44 UTC

[Bug 53858] New: Reading Hyperlink address having number sign(#) from cell giving improper link address

https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

          Priority: P2
            Bug ID: 53858
          Assignee: dev@poi.apache.org
           Summary: Reading Hyperlink address having number sign(#) from
                    cell giving improper link address
          Severity: normal
    Classification: Unclassified
                OS: Windows XP
          Reporter: kirti.tandel85@gmail.com
          Hardware: PC
            Status: NEW
           Version: 3.8
         Component: HSSF
           Product: POI

Created attachment 29365
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29365&action=edit
xsl file for testing

Step to reproduce issue:-
========================

1. Create a xls file with one cell with a hyperlink.(Address of hyperlink
should having number sign(#) in it. e.g
"http://www.bailii.org/databases.html#uk")

2. Try to read address of hyperlink. It will give link address as "uk".Only
characters after Address number sign (#) is considered as hyperlink address.

Code snippet:-
=============

String strLinkAddress = cell.getHyperlink().getAddress();

It will return "uk" as link address instead of
"http://www.bailii.org/databases.html#uk"

An xls file is attached for test.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #10 from javier.pajaro <ja...@junar.com> ---
(In reply to javier.pajaro from comment #9)
> I am having exactly the same problem. Is it planned a fix for this? Someone
> is working on this?

Sorry, I am using POI 3.9. The bug was reported under 3.8. Why is not
considered important?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
What does BiffViewer report for the hyperlink related records? Do it show the
full URL, or does it see just the anchor?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #3 from Kirti Tandel <ki...@gmail.com> ---
Created attachment 29368
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29368&action=edit
test.xls file used in program to read address of hyperlink in a cell

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #9 from javier.pajaro <ja...@junar.com> ---
I am having exactly the same problem. Is it planned a fix for this? Someone is
working on this?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Nick Burch <ap...@gagravarr.org> ---
Please try using org.apache.poi.hssf.dev.BiffViewer to see if the hyperlink is
stored in multiple records or not, and if BiffViewer can see the full url or
just the anchor.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #12 from javier.pajaro <ja...@junar.com> ---
(In reply to Nick Burch from comment #11)
> All work done on Apache POI is done by people who kindly volunteer their
> time. The importance of what work gets done is decided by those willing to
> put in their own time to do it!
> 
> If this bug is important to you, please consider investigating and
> submitting a patch. You would most likely need to read the Microsoft
> documentation on the format, run some sample files through something like
> BiffViewer to see how it works, then make changes to the POI code to handle
> how these hyperlinks are coded. If you get it working, please then attach
> the patch to this bug, so others can benefit!

Ok, I will try. But, it would be easier for the guy who wrote the Hyperlink
record. Dont you think the same? I am not asking for a new feature, just a fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #2 from Kirti Tandel <ki...@gmail.com> ---
Created attachment 29367
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29367&action=edit
Test program

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

Kirti Tandel <ki...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from Kirti Tandel <ki...@gmail.com> ---
I'm just trying to read a address of hyperlink given in a cell.

But instead of giving a full URL it gives only characters after #.

I have attached a simple program  and a test xls file here in aatachment.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #13 from Nick Burch <ap...@gagravarr.org> ---
(In reply to javier.pajaro from comment #12)
> Ok, I will try. But, it would be easier for the guy who wrote the Hyperlink
> record. Dont you think the same? I am not asking for a new feature, just a
> fix.

HyperlinkRecord was first introduced to the codebase over 5 years ago, and a
quick "svn log" shows that a large number of people have worked on it over that
time, both committers and external contributors. There's no one person who
"owns" any of the code, so anyone can (and is encouraged to!) dive in and
submit patches to enhance it

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #7 from Mark B <ma...@tiscali.co.uk> ---
Just found this on Microsoft's - http://support.microsoft.com/kb/202261 - do
not know if is strictly relevant but it does indicate that the # character
cannot be included within hyperlinks in Office documents. The focus of the
document appears top be upon # characters embedded into file names but I do
wonder if the same restriction may be applied here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #11 from Nick Burch <ap...@gagravarr.org> ---
All work done on Apache POI is done by people who kindly volunteer their time.
The importance of what work gets done is decided by those willing to put in
their own time to do it!

If this bug is important to you, please consider investigating and submitting a
patch. You would most likely need to read the Microsoft documentation on the
format, run some sample files through something like BiffViewer to see how it
works, then make changes to the POI code to handle how these hyperlinks are
coded. If you get it working, please then attach the patch to this bug, so
others can benefit!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

Kirti Tandel <ki...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Kirti Tandel <ki...@gmail.com> ---
I have treid using org.apache.poi.hssf.dev.BiffViewer and the hyperlink is
stored in records , and BiffViewer can see just the anchor in url.

record is shown as

[HYPERLINK RECORD]
    .range   = A1
    .guid    = 79EAC9D0-BAF9-11CE-8C82-00AA004BA90B
    .linkOpts= 0x0000001F
    .label   = kirti
    .moniker   = 79EAC9E0-BAF9-11CE-8C82-00AA004BA90B
    .textMark= uk
    .address   = uk
[/HYPERLINK RECORD]

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53858] Reading Hyperlink address having number sign(#) from cell giving improper link address

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53858

--- Comment #8 from Kirti Tandel <ki...@gmail.com> ---
I have tried to found solution for this issue on net but can't got yet.

Is there any possibility that this issue can be resolved in future version of
Apache POI.?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org