You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by PARIS Jean-Pierre RD-BIZZ-SOP <je...@francetelecom.com> on 2004/07/23 17:20:32 UTC

RE : Linking to other sheets in the same workbook

Hello!

 Fill the cell where you want to have your link with:
cell.setCellFormula("HYPERLINK(\"#" + __TheNameOfTheDestSheet__
                               + "!" + __TheNameOfTheDestCell__ + "\", \"" + __LinkLabel__ + "\")");

 In the Excel workbook, you will find for example:
=HYPERLINK("#Sheet1!A1", "More...")
depending on your locale for the function name and the argument separator.

 You'll have to set the cell style properly if you want blue undelined text.

Hope this help,

bye
jp

-----Message d'origine-----
De : Darshak Mehta [mailto:dmehta@juniper.net] 
Envoyé : jeudi 22 juillet 2004 21:03
À : POI Users List
Objet : RE: Linking to other sheets in the same workbook


Hi Pavan,

Thanks for the quick response. Unfortunately that doesn't serve my need.
I want to create a workbook using HSSF with multiple sheets. The first
sheet of this workbook will be a summary page with links to all the
other pages. I need a mechanism to generate these links
programmatically. Something similar to
http://www.questionpro.com/marketing/SurveyReport-289.xls first sheet.

Thanks,
Darshak



-----Original Message-----
From: Pavan Guduru [mailto:pavaneyes_isq@yahoo.com] 
Sent: Thursday, July 22, 2004 11:58 AM
To: POI Users List
Subject: Re: Linking to other sheets in the same workbook

Hello Darshak,
try


HSSFSheet workbook.getSheet(String "sheetName");

String workbook.getSheetName(int sheetIndex);

HSSFSheet workbook.getSheetAt(int sheetIndex);

int workbook.getSheetIndex(String sheetName);

These functions should let you navigate between sheets and get to the
required sheets and do the processing.

 

Thanks

Pavan
Darshak Mehta <dm...@juniper.net> wrote:

Hello,



I recently started fiddling around with HSSF. Can someone give me
pointers regarding linking cells to other sheets in the same workbook?
We have a multi sheet workbooks and Need to navigate from the first page
to other workbooks.



Thanks in advance,

Darshak




		
---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!


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


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