hyperlinks within Excel with POI

Discussion in 'Java' started by VadimGor, May 22, 2005.

  1. VadimGor

    VadimGor Guest

    I am looking for a way to create hyperlinks between worksheets
    within current workboard. POI that I am using supports this
    functionality throw cellFunction("HYPERLINK...")

    The format of hyperlink [workboardName]worksheet!cell is the
    only option suitable for my needs. The only problem is a workboardname.
    If user saves a file on a filesystem, so a workboard
    name is a file name, that application generates. Hyperlink works fine
    in this case.
    But when user chooses to open the document, generated by servlet,
    the name is changed with depend on number of versions in the
    "temporary files", so a file name changes from "reportXXXX.xls"
    to "reportXXXX[1..X].xls" and hyperlink does not work.

    Is there any way to detect/set a current workboard name ?
    Is any other Java-Excel api supports hyperlinks creation ?

    Thanks in advance
     
    VadimGor, May 22, 2005
    #1
    1. Advertisements

  2. VadimGor

    ByteCoder Guest

    AFAIK you don't have to use the Excel filename in the link.
     
    ByteCoder, May 22, 2005
    #2
    1. Advertisements

  3. VadimGor

    VadimGor Guest

    What name can be used as a "workboard name" as an option of
    HYPERLINK("[workboardname]worksheetName!cell") ?
     
    VadimGor, May 22, 2005
    #3
  4. VadimGor

    VadimGor Guest

    What name can be used as a "workboard name" as an option of
    HYPERLINK("[workboardname]worksheetName!cell") ?
     
    VadimGor, May 22, 2005
    #4
  5. VadimGor

    ByteCoder Guest

    Are you linking to a cell from within the excel file or from the outside
    of the excel file?
     
    ByteCoder, May 22, 2005
    #5
  6. VadimGor

    VadimGor Guest

    I need to create a link from one worksheet:cell to other one within the
    same
    excel file. I am using a jakarta POI currently but can switch to any
    oher
    java-to-excel api, supporting this functuinlaity.

    thanks
     
    VadimGor, May 22, 2005
    #6
  7. VadimGor

    ByteCoder Guest

    That way you can just use sheet!cell
     
    ByteCoder, May 22, 2005
    #7
  8. VadimGor

    VadimGor Guest

    sheet!cell is not a valid, HYPERLINK requires [workbook]sheet!cell.
    The best what I can do is extract a workbookname dynamically with CELL
    function. This works fine when excel saved on the file system and
    opened later.
    But this solution does not work when document opened from a WEB.
    Firstly, EXCEL claims about security since link referenced to a
    document from
    the "Temporary Internet Files",
    Finally the file name changed to something like this
    "report_XXXXX[1-N].xls"
    and EXCEL tries to open "report_XXXXX(1-N).xls" (no idea why it changes
    "["
    to "(" ).
     
    VadimGor, May 22, 2005
    #8
  9. VadimGor

    ByteCoder Guest

    I use OpenOffice.Org, so I don't know if the Hyperlink fuctions are the
    same, but this is the OOo hyperlink: HYPERLINK(URL; CellText)

    Maybe you could use "." as the URL?
     
    ByteCoder, May 22, 2005
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.