You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Wulf Wechsung <ww...@contexo.de> on 2003/02/25 14:54:15 UTC

Named Ranges (are they called that?)

Hi!

sorry if this has been asked before but I honestly scanned the archive and
found nothing. So here it goes:
I am using PIO 1.5.0 (the current stable release) and I wonder how to access
the 'named ranges'. I am not sure if that term is right, I am referring to
the areas that one can name by selecting a couple of cells and then choosing
'insert->name->define' (or some such, I got a German Excel, sorry). 
In the javadocs provided from the pio site which where marked as version
1.11~ there where actually methods in HSSFWorkbook that I though would do
just that (getNameName(), getNumNames() etc). In 'my' javadocs for version
1.5.0 and 1.5.1 no such luck though. The thing is, I need this functionality
rather urgendly as I try to implement a sort of template engine for excel
where the template is actually an excel file itself. So for repeating areas
I need some neutral mechanism to mark them as loops (like naming a number of
cells as $loop1 or something like that). 
For any tips on to where to get versions that support detecting those named
ranged or on implementing that functionality, I would be quite, very
thankfull :-)

Cheers,
Wulf

Re: Named Ranges (are they called that?)

Posted by Danny Mui <da...@muibros.com>.
The nightly contains this functionality but the workaround Steve 
presented seems to provide the solution to your problem if you're a bit 
wary of nightlys.  Since it's not in the 1.5 javadocs, it's a good 
chance the functionality is not in there ;).

danny

Wulf Wechsung wrote:

>Hi!
>
>sorry if this has been asked before but I honestly scanned the archive and
>found nothing. So here it goes:
>I am using PIO 1.5.0 (the current stable release) and I wonder how to access
>the 'named ranges'. I am not sure if that term is right, I am referring to
>the areas that one can name by selecting a couple of cells and then choosing
>'insert->name->define' (or some such, I got a German Excel, sorry). 
>In the javadocs provided from the pio site which where marked as version
>1.11~ there where actually methods in HSSFWorkbook that I though would do
>just that (getNameName(), getNumNames() etc). In 'my' javadocs for version
>1.5.0 and 1.5.1 no such luck though. The thing is, I need this functionality
>rather urgendly as I try to implement a sort of template engine for excel
>where the template is actually an excel file itself. So for repeating areas
>I need some neutral mechanism to mark them as loops (like naming a number of
>cells as $loop1 or something like that). 
>For any tips on to where to get versions that support detecting those named
>ranged or on implementing that functionality, I would be quite, very
>thankfull :-)
>
>Cheers,
>Wulf
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>  
>



Re: Named Ranges (are they called that?)

Posted by Steve <st...@Basit.COM>.
I am using 1.5.1.
To solve this problem, I put "tags" in the template .xls file.
Then, I search for the tag that I am interested in.
When I find it, I remove the tag, and I put the data
in that cell.
To be more specific, I put tags like "<tag_name>" in
certain rows (in column 0). And, in then in column 4 and 5
I put "<tag>" and "<tag>".  I search down the rows
looking for the tag <tag_name>". When I find it, I then
look at the columns to find the column "<tag>" items.
I've implemented some methods that make repetitive
use of this functionality easy to do.
At the end of the process for a sheet, you can delete
column 0, if so desired.
Hope this is helpful to you.
So far, it is working nicely.
--Steve

----- Original Message -----
From: "Wulf Wechsung" <ww...@contexo.de>
To: "PIO (E-Mail)" <po...@jakarta.apache.org>
Sent: Tuesday, February 25, 2003 8:54 AM
Subject: Named Ranges (are they called that?)


> Hi!
>
> sorry if this has been asked before but I honestly scanned the archive and
> found nothing. So here it goes:
> I am using PIO 1.5.0 (the current stable release) and I wonder how to
access
> the 'named ranges'. I am not sure if that term is right, I am referring to
> the areas that one can name by selecting a couple of cells and then
choosing
> 'insert->name->define' (or some such, I got a German Excel, sorry).
> In the javadocs provided from the pio site which where marked as version
> 1.11~ there where actually methods in HSSFWorkbook that I though would do
> just that (getNameName(), getNumNames() etc). In 'my' javadocs for version
> 1.5.0 and 1.5.1 no such luck though. The thing is, I need this
functionality
> rather urgendly as I try to implement a sort of template engine for excel
> where the template is actually an excel file itself. So for repeating
areas
> I need some neutral mechanism to mark them as loops (like naming a number
of
> cells as $loop1 or something like that).
> For any tips on to where to get versions that support detecting those
named
> ranged or on implementing that functionality, I would be quite, very
> thankfull :-)
>
> Cheers,
> Wulf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>