You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/07/19 07:03:10 UTC

DO NOT REPLY [Bug 49612] New: problem in reading Named cells

https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

           Summary: problem in reading Named cells
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
        AssignedTo: dev@poi.apache.org
        ReportedBy: ranvijayps@gmail.com


hi,
    I have facing an issue in reading excel sheets though poi.

within sheet1 lets A8 is denoted by some_name.when i try to read
this as 'sheet1'!some_name within sheet2 in any cell then this 

cell type changes to 

org.apache.poi.hssf.record.formula.eval.NameXEval and value 

return is null

while 'sheet1'!A8 work fine and in this case the type of cell is 

org.apache.poi.hssf.record.formula.eval.NumberEval


due this all the formulas are getting fail which has 

'sheet1'!some_name. and throws exceltion 
Unexcepted eval type 

(org.apache.poi.hssf.record.formula.eval.NameXEval)

can you plz, help me 

Thanks
ranvijay

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Re: DO NOT REPLY [Bug 49612] New: problem in reading Named cells

Posted by MSB <ma...@tiscali.co.uk>.
Can I just check please, are the two sheets in the same Excel workbook?
Further, the named cell does exist, ny this, I mean that the name is spelled
correctly in the forumla and that there is a cell on the sheet with that
exact name?

Tonight, I should have the chance to play with some code so I will see if I
can replicate the problem.

Yours

Mark B


Bugzilla from bugzilla@apache.org wrote:
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=49612
> 
>            Summary: problem in reading Named cells
>            Product: POI
>            Version: 3.6
>           Platform: PC
>         OS/Version: Windows XP
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: POI Overall
>         AssignedTo: dev@poi.apache.org
>         ReportedBy: ranvijayps@gmail.com
> 
> 
> hi,
>     I have facing an issue in reading excel sheets though poi.
> 
> within sheet1 lets A8 is denoted by some_name.when i try to read
> this as 'sheet1'!some_name within sheet2 in any cell then this 
> 
> cell type changes to 
> 
> org.apache.poi.hssf.record.formula.eval.NameXEval and value 
> 
> return is null
> 
> while 'sheet1'!A8 work fine and in this case the type of cell is 
> 
> org.apache.poi.hssf.record.formula.eval.NumberEval
> 
> 
> due this all the formulas are getting fail which has 
> 
> 'sheet1'!some_name. and throws exceltion 
> Unexcepted eval type 
> 
> (org.apache.poi.hssf.record.formula.eval.NameXEval)
> 
> can you plz, help me 
> 
> Thanks
> ranvijay
> 
> -- 
> Configure bugmail:
> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-49612--New%3A-problem-in-reading-Named-cells-tp29201508p29202268.html
Sent from the POI - Dev mailing list archive at Nabble.com.


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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

Ranvijay <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Ranvijay <ra...@gmail.com> 2010-07-23 06:19:14 EDT ---
(In reply to comment #1)
> It would be helpful for us to diagnose the problem if you attach a workbook and
> sample code that demonstrate the behavior - ideally a failing junit test. 
> 
> Yegor

hi Yegor,

  this is output i have got on console.I am attaching  the Excel file
  in this excel file cell value at location [0,2] ( 0 base indexing) use
formula
  SUM(BOB+JIM) gives right value 30.but at location [0,3] which uses formula 
 
SUM('named-cell-in-formula-test.xls'!BOB+'named-cell-in-formula-test.xls'!JIM)
  is not excuting. as it throws following error

java class code::


package test;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

import org.apache.poi.hssf.record.formula.eval.BoolEval;
import org.apache.poi.hssf.record.formula.eval.NameXEval;
import org.apache.poi.hssf.record.formula.eval.NumberEval;
import org.apache.poi.hssf.record.formula.eval.StringEval;
import org.apache.poi.hssf.record.formula.eval.ValueEval;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.formula.IStabilityClassifier;
import org.apache.poi.ss.formula.eval.forked.ForkedEvaluator;


/**
 * Testing POI's use of Named Cells.
 * 
 * @author bsneade
 */
public class NamedCellTest {

    public static void main(final String[] args) {
        try {
            // load up the spreadsheet            
    String path="C:\\test\\named-cell-in-formula-test.xls";

            final HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(new
File(path)));                
            //HSSFFormulaEvaluator.evaluateAllFormulaCells(wb);    
            HSSFSheet sheet1 = wb.getSheet("sheet1");
            String val2=getCellValue(wb, sheet1, 0, 2);
            System.out.println("[0,2]::"+val2);            
            String val4=getCellValue(wb, sheet1, 0, 3);
            System.out.println("[0,3]::"+val4);

        } catch (IOException e) {
            e.printStackTrace();
        }

    }

public static String getCellValue(HSSFWorkbook wb, HSSFSheet sheet,
            int rowNr, int colNr) {
        String value = null;
        ForkedEvaluator fEval = ForkedEvaluator.create(wb,
                IStabilityClassifier.TOTALLY_IMMUTABLE, null);
        HSSFRow row = sheet.getRow(rowNr);
        if (row != null) {
            HSSFCell cell = row.getCell(colNr);

         if (cell != null) {
                switch (cell.getCellType()) {

        case HSSFCell.CELL_TYPE_STRING:
            value = cell.getRichStringCellValue().getString();
                    break;
        case HSSFCell.CELL_TYPE_NUMERIC:
            value = Double.toString(cell.getNumericCellValue());
                    break;
        case HSSFCell.CELL_TYPE_BOOLEAN:
            value = Boolean.toString(cell.getBooleanCellValue());
                    break;
        case HSSFCell.CELL_TYPE_FORMULA:

ValueEval vEval=(ValueEval)fEval.evaluate(sheet.getSheetName(),rowNr,colNr);    
   if (vEval instanceof BoolEval) {
        value = ((BoolEval) vEval).getStringValue();
        } else if (vEval instanceof NumberEval) {
          value = ((NumberEval) vEval).getStringValue();
        } else if (vEval instanceof StringEval) {
          value = ((StringEval) vEval).getStringValue();
                    }                
                    break;                    
                    default:
                }
            }
        }
        return value;
    }

}




[0,2]::30

Exception in thread "main" java.lang.RuntimeException: Unexpected arg eval type
(org.apache.poi.hssf.record.formula.eval.NameXEval)
    at
org.apache.poi.hssf.record.formula.eval.OperandResolver.coerceValueToDouble(OperandResolver.java:218)
    at
org.apache.poi.hssf.record.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:30)
    at
org.apache.poi.hssf.record.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35)
    at
org.apache.poi.hssf.record.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33)
    at
org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119)
    at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:437)
    at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:260)
    at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:206)
    at
org.apache.poi.ss.formula.eval.forked.ForkedEvaluator.evaluate(ForkedEvaluator.java:119)
    at test.NamedCellTest.getCellValue(NamedCellTest.java:68)
    at test.NamedCellTest.main(NamedCellTest.java:37)


Thanks
Ranvijay

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

--- Comment #7 from Ranvijay <ra...@gmail.com> 2010-07-29 07:10:02 EDT ---
(In reply to comment #6)
> Name evaluation across workbooks is not supported by POI. Josh Micich, the
> developer who wrote most of the evaluation code confirmed that and and I have
> to resolve this bug report as "wontfix". 
> 
> The syntax SUM('file1.xls'!BOB+'file2.xls'!JIM) means that BOB and JIM are 
> external names and evaluator needs to open file1.xls and file2.xls to evaluate
> them and this is not supported.  
> 
> Yegor

hi Yegor,
          Thanks for reply,
          I understand that external names are not supported by POI as you
          mentioned.but same error also occur in the same .xls file for two
          different sheets.
              lets say two sheets are sheet1 and sheet2 and excel file is
          file1.xls.lets there are two named defined name1 and name2 in sheet1

          now when i am trying to use SUM('sheet1'!name1+'sheet1'!name2)
          in sheet2 for the same excel file file1.xls,then same exception
          which i mentioned previously comes.

          Can You plz, confirmed me that this is supported by POI or not

Thanks
Ranvijay

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Re: DO NOT REPLY [Bug 49612] New: problem in reading Named cells

Posted by MSB <ma...@tiscali.co.uk>.
Thanks David, I did have a brief look through the documentation for the
latest version I had on hand - 3.7 Beta 1 - but could not see scoping
mentioned. That is not to say it is not there of course; my brain is a bit
addled at the moment as the sun has been beating down onto my head all day
whilst we have been, quite literally, making hay, oh, and avoiding bee's
nests (gorgeous little red tailed bees nesting in an abandoned burrow).

Having said that, I still feel the original 'problem' has to do with
preceding the name of the cell/range with that of the sheet. When I was
digging around in Excel, I found this caused an error there - I think it was
the familiar #NAME message displayed in the cell. One other thing that I
also noticed is that Excel substituted the name of the workbook for that of
the sheet in some cases, I guess it was trying to disambiguate and make it
obvious that the reference related to a cell with workbook scope but I do
not know this to be true. This also raises the possibility of using Josh's
ForkedEvaluator to deal with these sorts of problems but again, this is not
something I have experimented with to date.

Still, I believe that just the name of the cell or range should appear in
the formula and that any reference to the sheet is superfluous; Excel should
be able to determine the 'real' address of the cell from the information
used to define the name. The only remaining concern I have is when there are
two ranges with identical names but different scopes. I need to check to see
what Excel does in that case and should have the chance to do so a little
later; I feel this is when Excel tries to disambguate the name but am not
certain by any means.

Yours

Mark B


David Fisher wrote:
> 
> Mark,
> 
> I recall that Yegor made improvements in the scoping of names. I think
> this was since POI 3.6, but may be just prior to that release. I thiknk
> that it is possible to control the scoping between worksheet and workbook.
> 
> Regards,
> Dave
> 
> On Jul 19, 2010, at 8:27 AM, MSB wrote:
> 
>> 
>> Typically, you do not use names in formulas in the way you specify, i.e.
>> 'Sheet2'!name, rather you use the 'simple name' to use Java terminology.
>> Therefore, the 'Sheet2'!name example above would really be just name.
>> Names
>> have a scope, they can be declared to relate to the workbook or worksheet
>> (at least they can is they are created using Excel, how this works with
>> POI,
>> I do not yet know), and the scope determines where the name can be used.
>> For
>> example, a name with worksheet scope can only be used in one sheet. For
>> example, suppose we define a name called test_name, make that name refer
>> to
>> cell A1 of Sheet2 and set it's scope to worksheet, then you can only
>> refer
>> to this name within cells on Sheet2. Any attempt to use that name in a
>> formula on a different sheet will result in an error; and this is true
>> whther you are using POI or Excel.
>> 
>> If you want to use a name to refer to a cell and then use that name in a
>> formula on another sheet then the name's scope should be set to workbook
>> and
>> not worksheet. Using the example above again, we can create the name
>> test_name, link that to cell A1 on Sheet2 and set it's scope as workbook.
>> Now, it is possible to refer to this cell using the name within a
>> formula.
>> 
>> In both cases though, you would not use the syntax you included in your
>> original e-mail - 'Sheet2'!test_name, but would use just test_name. Excel
>> would then look up in it's names table what the name referred to,
>> interpret
>> the scope and then return the contents of the appropriate cell.
>> 
>> If you are creating the names using POI, then I do not think there is any
>> way to set the scope explicitly - and I am going to assume they all have
>> workbook scope as a result though I do not know if this is the case - but
>> do
>> believe that the same basic principles will still hold sway; that is to
>> say
>> you will identify the sheet and cell when you create the name then, when
>> you
>> the name appears in a formula, you simply use the name without prefixing
>> the
>> sheet's name to it.
>> 
>> So, to summarise, do not prefix the name of the cell or area with that of
>> the sheet on which it appears and you should not see this error again.
>> Hope
>> this helps.
>> 
>> Yours
>> 
>> Mark B
>> 
>> 
>> Bugzilla from bugzilla@apache.org wrote:
>>> 
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=49612
>>> 
>>>           Summary: problem in reading Named cells
>>>           Product: POI
>>>           Version: 3.6
>>>          Platform: PC
>>>        OS/Version: Windows XP
>>>            Status: NEW
>>>          Severity: normal
>>>          Priority: P2
>>>         Component: POI Overall
>>>        AssignedTo: dev@poi.apache.org
>>>        ReportedBy: ranvijayps@gmail.com
>>> 
>>> 
>>> hi,
>>>    I have facing an issue in reading excel sheets though poi.
>>> 
>>> within sheet1 lets A8 is denoted by some_name.when i try to read
>>> this as 'sheet1'!some_name within sheet2 in any cell then this 
>>> 
>>> cell type changes to 
>>> 
>>> org.apache.poi.hssf.record.formula.eval.NameXEval and value 
>>> 
>>> return is null
>>> 
>>> while 'sheet1'!A8 work fine and in this case the type of cell is 
>>> 
>>> org.apache.poi.hssf.record.formula.eval.NumberEval
>>> 
>>> 
>>> due this all the formulas are getting fail which has 
>>> 
>>> 'sheet1'!some_name. and throws exceltion 
>>> Unexcepted eval type 
>>> 
>>> (org.apache.poi.hssf.record.formula.eval.NameXEval)
>>> 
>>> can you plz, help me 
>>> 
>>> Thanks
>>> ranvijay
>>> 
>>> -- 
>>> Configure bugmail:
>>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>>> ------- You are receiving this mail because: -------
>>> You are the assignee for the bug.
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
>>> For additional commands, e-mail: dev-help@poi.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/DO-NOT-REPLY--Bug-49612--New%3A-problem-in-reading-Named-cells-tp29201508p29205905.html
>> Sent from the POI - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
>> For additional commands, e-mail: dev-help@poi.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-49612--New%3A-problem-in-reading-Named-cells-tp29201508p29206359.html
Sent from the POI - Dev mailing list archive at Nabble.com.


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


Re: DO NOT REPLY [Bug 49612] New: problem in reading Named cells

Posted by David Fisher <df...@jmlafferty.com>.
Mark,

I recall that Yegor made improvements in the scoping of names. I think this was since POI 3.6, but may be just prior to that release. I thiknk that it is possible to control the scoping between worksheet and workbook.

Regards,
Dave

On Jul 19, 2010, at 8:27 AM, MSB wrote:

> 
> Typically, you do not use names in formulas in the way you specify, i.e.
> 'Sheet2'!name, rather you use the 'simple name' to use Java terminology.
> Therefore, the 'Sheet2'!name example above would really be just name. Names
> have a scope, they can be declared to relate to the workbook or worksheet
> (at least they can is they are created using Excel, how this works with POI,
> I do not yet know), and the scope determines where the name can be used. For
> example, a name with worksheet scope can only be used in one sheet. For
> example, suppose we define a name called test_name, make that name refer to
> cell A1 of Sheet2 and set it's scope to worksheet, then you can only refer
> to this name within cells on Sheet2. Any attempt to use that name in a
> formula on a different sheet will result in an error; and this is true
> whther you are using POI or Excel.
> 
> If you want to use a name to refer to a cell and then use that name in a
> formula on another sheet then the name's scope should be set to workbook and
> not worksheet. Using the example above again, we can create the name
> test_name, link that to cell A1 on Sheet2 and set it's scope as workbook.
> Now, it is possible to refer to this cell using the name within a formula.
> 
> In both cases though, you would not use the syntax you included in your
> original e-mail - 'Sheet2'!test_name, but would use just test_name. Excel
> would then look up in it's names table what the name referred to, interpret
> the scope and then return the contents of the appropriate cell.
> 
> If you are creating the names using POI, then I do not think there is any
> way to set the scope explicitly - and I am going to assume they all have
> workbook scope as a result though I do not know if this is the case - but do
> believe that the same basic principles will still hold sway; that is to say
> you will identify the sheet and cell when you create the name then, when you
> the name appears in a formula, you simply use the name without prefixing the
> sheet's name to it.
> 
> So, to summarise, do not prefix the name of the cell or area with that of
> the sheet on which it appears and you should not see this error again. Hope
> this helps.
> 
> Yours
> 
> Mark B
> 
> 
> Bugzilla from bugzilla@apache.org wrote:
>> 
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=49612
>> 
>>           Summary: problem in reading Named cells
>>           Product: POI
>>           Version: 3.6
>>          Platform: PC
>>        OS/Version: Windows XP
>>            Status: NEW
>>          Severity: normal
>>          Priority: P2
>>         Component: POI Overall
>>        AssignedTo: dev@poi.apache.org
>>        ReportedBy: ranvijayps@gmail.com
>> 
>> 
>> hi,
>>    I have facing an issue in reading excel sheets though poi.
>> 
>> within sheet1 lets A8 is denoted by some_name.when i try to read
>> this as 'sheet1'!some_name within sheet2 in any cell then this 
>> 
>> cell type changes to 
>> 
>> org.apache.poi.hssf.record.formula.eval.NameXEval and value 
>> 
>> return is null
>> 
>> while 'sheet1'!A8 work fine and in this case the type of cell is 
>> 
>> org.apache.poi.hssf.record.formula.eval.NumberEval
>> 
>> 
>> due this all the formulas are getting fail which has 
>> 
>> 'sheet1'!some_name. and throws exceltion 
>> Unexcepted eval type 
>> 
>> (org.apache.poi.hssf.record.formula.eval.NameXEval)
>> 
>> can you plz, help me 
>> 
>> Thanks
>> ranvijay
>> 
>> -- 
>> Configure bugmail:
>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>> ------- You are receiving this mail because: -------
>> You are the assignee for the bug.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
>> For additional commands, e-mail: dev-help@poi.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-49612--New%3A-problem-in-reading-Named-cells-tp29201508p29205905.html
> Sent from the POI - Dev mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 


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


Re: DO NOT REPLY [Bug 49612] New: problem in reading Named cells

Posted by MSB <ma...@tiscali.co.uk>.
Typically, you do not use names in formulas in the way you specify, i.e.
'Sheet2'!name, rather you use the 'simple name' to use Java terminology.
Therefore, the 'Sheet2'!name example above would really be just name. Names
have a scope, they can be declared to relate to the workbook or worksheet
(at least they can is they are created using Excel, how this works with POI,
I do not yet know), and the scope determines where the name can be used. For
example, a name with worksheet scope can only be used in one sheet. For
example, suppose we define a name called test_name, make that name refer to
cell A1 of Sheet2 and set it's scope to worksheet, then you can only refer
to this name within cells on Sheet2. Any attempt to use that name in a
formula on a different sheet will result in an error; and this is true
whther you are using POI or Excel.

If you want to use a name to refer to a cell and then use that name in a
formula on another sheet then the name's scope should be set to workbook and
not worksheet. Using the example above again, we can create the name
test_name, link that to cell A1 on Sheet2 and set it's scope as workbook.
Now, it is possible to refer to this cell using the name within a formula.

In both cases though, you would not use the syntax you included in your
original e-mail - 'Sheet2'!test_name, but would use just test_name. Excel
would then look up in it's names table what the name referred to, interpret
the scope and then return the contents of the appropriate cell.

If you are creating the names using POI, then I do not think there is any
way to set the scope explicitly - and I am going to assume they all have
workbook scope as a result though I do not know if this is the case - but do
believe that the same basic principles will still hold sway; that is to say
you will identify the sheet and cell when you create the name then, when you
the name appears in a formula, you simply use the name without prefixing the
sheet's name to it.

So, to summarise, do not prefix the name of the cell or area with that of
the sheet on which it appears and you should not see this error again. Hope
this helps.

Yours

Mark B


Bugzilla from bugzilla@apache.org wrote:
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=49612
> 
>            Summary: problem in reading Named cells
>            Product: POI
>            Version: 3.6
>           Platform: PC
>         OS/Version: Windows XP
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: POI Overall
>         AssignedTo: dev@poi.apache.org
>         ReportedBy: ranvijayps@gmail.com
> 
> 
> hi,
>     I have facing an issue in reading excel sheets though poi.
> 
> within sheet1 lets A8 is denoted by some_name.when i try to read
> this as 'sheet1'!some_name within sheet2 in any cell then this 
> 
> cell type changes to 
> 
> org.apache.poi.hssf.record.formula.eval.NameXEval and value 
> 
> return is null
> 
> while 'sheet1'!A8 work fine and in this case the type of cell is 
> 
> org.apache.poi.hssf.record.formula.eval.NumberEval
> 
> 
> due this all the formulas are getting fail which has 
> 
> 'sheet1'!some_name. and throws exceltion 
> Unexcepted eval type 
> 
> (org.apache.poi.hssf.record.formula.eval.NameXEval)
> 
> can you plz, help me 
> 
> Thanks
> ranvijay
> 
> -- 
> Configure bugmail:
> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-49612--New%3A-problem-in-reading-Named-cells-tp29201508p29205905.html
Sent from the POI - Dev mailing list archive at Nabble.com.


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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Yegor Kozlov <ye...@dinom.ru> 2010-07-29 02:36:24 EDT ---
Name evaluation across workbooks is not supported by POI. Josh Micich, the
developer who wrote most of the evaluation code confirmed that and and I have
to resolve this bug report as "wontfix". 

The syntax SUM('file1.xls'!BOB+'file2.xls'!JIM) means that BOB and JIM are 
external names and evaluator needs to open file1.xls and file2.xls to evaluate
them and this is not supported.  

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from Yegor Kozlov <ye...@dinom.ru> 2010-07-24 07:39:39 EDT ---
Thanks for the additional information. 

I confirmed the problem and added failing unit test. Please wait, I hope it
will be fixed soon.

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2010-07-20 06:46:01 EDT ---
It would be helpful for us to diagnose the problem if you attach a workbook and
sample code that demonstrate the behavior - ideally a failing junit test. 

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

--- Comment #3 from Ranvijay <ra...@gmail.com> 2010-07-23 06:20:43 EDT ---
Created an attachment (id=25797)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25797)
excel file for

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

--- Comment #8 from Yegor Kozlov <ye...@dinom.ru> 2010-07-29 07:21:01 EDT ---
I will tell for sure if you attach a sample file and java code demonstrating
that evaluation of SUM('sheet1'!name1+'sheet1'!name2) does not work. 

Yegor

> hi Yegor,
>           Thanks for reply,
>           I understand that external names are not supported by POI as you
>           mentioned.but same error also occur in the same .xls file for two
>           different sheets.
>               lets say two sheets are sheet1 and sheet2 and excel file is
>           file1.xls.lets there are two named defined name1 and name2 in sheet1
> 
>           now when i am trying to use SUM('sheet1'!name1+'sheet1'!name2)
>           in sheet2 for the same excel file file1.xls,then same exception
>           which i mentioned previously comes.
> 
>           Can You plz, confirmed me that this is supported by POI or not
> 
> Thanks
> Ranvijay

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 49612] problem in reading Named cells

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49612

--- Comment #5 from Ranvijay <ra...@gmail.com> 2010-07-29 00:16:54 EDT ---
(In reply to comment #4)
> Thanks for the additional information. 
> 
> I confirmed the problem and added failing unit test. Please wait, I hope it
> will be fixed soon.
> 
> Yegor

hi Yegor,
            Is there any updates regarding my issue.


Thanks
Ranviyay

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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