[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    Re: FormulaParser does not understand references like "Sheet1!A1'
From:       Avik Sengupta <lists () aviksengupta ! com>
Date:       2002-09-16 9:58:59
[Download RAW message or body]

I'll probably get to it in a couple of days, but thats only coz i do much less 
than Andy... 

However, without a proper patch in bugzilla, its likely that it will drop off 
the bottom of the mailboxes. 


Quoting "Andrew C. Oliver" <andy@superlinksoftware.com>:

> Not trying to be a jerk, its just I'm extremely busy so if patches 
> aren't submitted in "good form" then as much as I wish I could I know I 
> won't apply them.  If you want to help, it takes far less time to submit 
> a patch in "good form" than it does to: 1. Argue about it 2. Actually 
> solve problems. 3. Me to apply a patch not in good form (because I have 
> to redo most of the work).  For instructions read the last section here:
> 
> http://jakarta.apache.org/poi/getinvolved/index.html
> 
> This is not to say that Avik or Glen won't apply it, but its unlikely I 
> will.
> 
> -Andy
> 
> Iouri Michtchenko wrote:
> 
> >Hi,
> >I tried to create a simple formula "=Sheet1!A1' and as the result I had
> >"#REF!A1" in my Excel file. After small digging I found out that
> >FormulaParser converts all sheet names to the upper case and then calls
> >"getSheetIndex()" in "model.Woorkbook". And that method is a case
> sensitive
> >one... As I know Excle is not case sensitive to sheet names ("Sheet1" and
> >"SHEET1" are just the same for Excel) So I changed the method and
> >I succeded with my simple formula.
> >
> >from org.apache.poi.model.Workbook
> >-------------------------------------------------------------
> >    public int getSheetIndex(String name) {
> >        int    retval  = -1;
> >        String uppName = name.toUpperCase();
> >
> >        for (int k = 0; k < boundsheets.size(); k++) {
> >            String sheet = getSheetName(k).toUpperCase();
> >
> >            if (sheet.equals(uppName)) {
> >                retval = k;
> >                break;
> >            }
> >        }
> >        return retval;
> >    }
> >-------------------------------------------------------------
> >I would like to note that FormulaParser searches for the sheet index using
> >code:
> >
> > short externIdx = book.checkExternSheet(book.getSheetIndex(sheetName));
> >
> >and "checkExternSheet()" eats "-1" (when sheet does not exists) without
> >errors.
> >
> >
> >Regards,
> >Iouri.
> >
> >P.S.
> >Sorry for the format of my comments. I don't have time to study how to
> make
> >properly.
> >But I would like to help because POI helps me a lot ;)
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:poi-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: <mailto:poi-user-help@jakarta.apache.org>
> >
> >
> >  
> >
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:poi-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:poi-user-help@jakarta.apache.org>
> 
> 



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic