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 2005/12/15 18:33:01 UTC

DO NOT REPLY [Bug 37923] New: - Trying to read an excel worksheet with hyperlink references

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923

           Summary: Trying to read an excel worksheet with hyperlink
                    references
           Product: POI
           Version: 3.0-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: darren.wrigley@asg.com


I have a spreadsheet that I am trying to read using POI (either using the Event
Model or User API).

When I get to a cell that has a hyperlink - I can only read the display value of
the cell, not the hyperlink reference itself (url).

It seems that you an only create hyperlink references with the API, not read
them back?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 37923] - Trying to read an excel worksheet with hyperlink references

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923





------- Additional Comments From jeffmo@torreypath.com  2008-01-28 14:47 -------
I too am having the same problem.  I have tried a number of things, and even
found out that when I try to perform a cell.getCellFormula(), it gives me an
error no matter what I do.  I'm trying to process an excel file and load the
data into a database and would really love to be able to get the URL information.

Im using 3.0.1 Final.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 37923] - Trying to read an excel worksheet with hyperlink references

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923


nick@torchbox.com changed:

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




------- Additional Comments From nick@torchbox.com  2008-01-29 02:10 -------
Can you upload a simple file with a hyperlink in, so there's something for us to
test any new hyperlink support against?

Format should ideally be like:
 Text    Some other text
 URL (as text)
 Hyperlink (Text -> URL)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 37923] - Trying to read an excel worksheet with hyperlink references

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923


yegor@dinom.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From yegor@dinom.ru  2008-02-07 01:01 -------
Support for Excel hyperlinks is implemented.

How to read:

    HSSFSheet sheet = workbook.getSheetAt(0);

    HSSFCell cell = sheet.getRow(0).getCell((short)0);
    HSSFHyperlink link = cell.getHyperlink();
    if(link != null){
        System.out.println(link.getAddress());
    }

See also the quick guide:
http://poi.apache.org/hssf/quick-guide.html

Yegor

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


[Bug 37923] Trying to read an excel worksheet with hyperlink references

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





--- Comment #7 from Jeff Merino-Ott <je...@torreypath.com>  2008-02-27 08:57:40 ---
I don't have HSSFHyperlink.  and HSSFCell doesn't have getHyperlink().

I'm using 3.0.2 final.  Is there a newer jar for me to try?

Thanks!
  jeff


(In reply to comment #6)
> Support for Excel hyperlinks is implemented.
> 
> How to read:
> 
>     HSSFSheet sheet = workbook.getSheetAt(0);
> 
>     HSSFCell cell = sheet.getRow(0).getCell((short)0);
>     HSSFHyperlink link = cell.getHyperlink();
>     if(link != null){
>         System.out.println(link.getAddress());
>     }
> 
> See also the quick guide:
> http://poi.apache.org/hssf/quick-guide.html
> 
> Yegor


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 37923] - Trying to read an excel worksheet with hyperlink references

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923





------- Additional Comments From nick@torchbox.com  2008-02-01 10:24 -------
I've added support for the Hyperlink record, and tests for that

Hit a snag with getting it passed on to the usermodel code, as the records seem
to be in completely the wrong part of the record stream. See my post to dev@ for
details

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 37923] - Trying to read an excel worksheet with hyperlink references

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923





------- Additional Comments From jeffmo@torreypath.com  2008-01-30 11:14 -------
Created an attachment (id=21453)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21453&action=view)
Sample Excel Spreadsheet with a Hyperink in it

Here is a spreadsheet (not my original source, as I'm not able to upload that).
 But one containing a URL column that is populated only once.  This is a
similar format to what I'm dealing with.  In Eclipse, I can't seem to locate
the URL anywhere in the debugger, so I can't determine how to get the URL.

I tried a String foo = cell.getFormula(), which is supposed to return a String
object, but always gives me a class cast exception
(org.apache.poi.hssf.record.LabelSSTRecord).

Thanks.
 jeff


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 37923] - Trying to read an excel worksheet with hyperlink references

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37923


yegor@dinom.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |ASSIGNED




------- Additional Comments From yegor@dinom.ru  2008-01-30 11:49 -------
Looks like support for the Hyperlink (0x1B8) record is missing. The URL info is
there.

Yegor 
 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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