hyperlinks within Excel with POI

V

VadimGor

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
 
B

ByteCoder

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

AFAIK you don't have to use the Excel filename in the link.
 
V

VadimGor

What name can be used as a "workboard name" as an option of
HYPERLINK("[workboardname]worksheetName!cell") ?
 
V

VadimGor

What name can be used as a "workboard name" as an option of
HYPERLINK("[workboardname]worksheetName!cell") ?
 
B

ByteCoder

What name can be used as a "workboard name" as an option of
HYPERLINK("[workboardname]worksheetName!cell") ?

Are you linking to a cell from within the excel file or from the outside
of the excel file?
 
V

VadimGor

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
 
B

ByteCoder

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

That way you can just use sheet!cell
 
V

VadimGor

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 "(" ).
 
B

ByteCoder

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 "(" ).

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?
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top