You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Tony Harris <To...@Cedar.com> on 2004/03/20 20:04:30 UTC

Working with named ranges

I load a spreadsheet that I then examine for named ranges.

I am dealing happy with named ranges of cells with a single cell range i.e.
Sheet1!$D$14:$D$54 or one that covers only a single cell.

However when I try to access a named range that consists of two separate
sets of cells i.e. Sheet1!$G$14:$G$20,Sheet1!$I$14:$I$20 I getting stuck.

First I find the index of the named range from the workbook then get the
HSSFName object and ask for the reference, for the simple cases this returns
what I expect, however for the complex version it returns an empty string.
I have tried this with 2.5 final with no luck.

I am doing something wrong or does POI not support this?

 HSSFName name = workbook.getNameAt(nameIndex);
 String reference = name.getReference();




Tony Harris
Product Development 
CedAr Software Ltd
CedAr House
78 Portsmouth Road
Cobham
Surrey
KT11 1HY

mailto:tony.harris@cedar.com 

About CedAr

CedAr Software Ltd. is the result of the newly formed merger between Cedar
Software and Arelon.  The company provides Financial, eProcurement and
Performance Management Solutions that deliver increased capabilities and
offer a direct and measurable financial return on investment.  CedAr has a
customer base of more than 500 organisations in both the public and private
sector.   As of October 2003, CedAr also offers HR and Payroll solutions,
following the acquisition of Goldenhill Computer Systems Ltd.


Particular sector strengths include Airlines, Business Services, Education,
Emergency Services, Financial Services, Government, Health, Local
Authorities, Not for Profit, Retail and Utilities.  For more information,
please visit http://www.cedar.com 

© 2003 CedAr Software Ltd. All Rights Reserved.




*********************************************************************** 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. Any unauthorised distribution or copying is strictly 
prohibited. 
 
Whilst Cedar Software Ltd takes steps to prevent the transmission of 
viruses via e-mail, we can not guarantee that any email or 
attachment is free from computer viruses and you are strongly 
advised to undertake your own anti-virus precautions. 
 
Cedar Software Ltd grants no warranties regarding performance, 
use or quality of any e-mail or attachment and undertakes no 
liability for loss or damage, howsoever caused. 

CedAr is a leading UK supplier of Financial, eProcurement, Performance Management and, following the recent acquisition of Goldenhill Computer Systems Ltd, HR and Payroll software. Cedars solutions deliver increased capabilities and offer a direct and measurable financial return on investment.  The company has a customer base of more than 500 organisations in both the public and private sector. 
Particular sector strengths include Airlines, Business Services,
Education, Emergency Services, Financial Services, Government, Health, Local Authorities, Not for Profit, Retail and Utilities.  For more
information, please visit www.cedar.com 
2003 CedAr Software Ltd. All Rights Reserved. 
Cedar Software Ltd. Incorporation number 3214465
 ***********************************************************************


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