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 2009/11/10 07:54:48 UTC
DO NOT REPLY [Bug 48165] New: Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
Summary: Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Product: POI
Version: 3.5-FINAL
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: safinwang@qq.com
I want to evaluate a workbook that linked to other workbook using the following
method:
String dirName = "c:/somedir/";
String bookNameA = "test.xls";
String bookNameB = "rm0509.xls";
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(dirName + bookNameA));
HSSFWorkbook wbB = new HSSFWorkbook(new FileInputStream(dirName + bookNameB));
HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(wb);
HSSFFormulaEvaluator feB = new HSSFFormulaEvaluator(wbB);
// Set up the workbook environment for evaluation
String[] workbookNames = { bookNameA, bookNameB, };
HSSFFormulaEvaluator[] evaluators = { evaluator, feB, };
HSSFFormulaEvaluator.setupEnvironment(workbookNames, evaluators);
// do an evaluation
HSSFCell cell = wb.getSheetAt(0).getRow(0).getCell(0);
evaluator.evaluateFormulaCell(cell);
The exception happens when call the evaluator.evaluateFormulaCell(cell)
method,the exception message is like this:
14:18:08,437 [http-8080-Processor18] ERROR jsp - java.lang.RuntimeException:
Invalid sheet name '1.2.1_LNE' in bool '1_Structure_Data.xls'.
at
org.apache.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:90)
at
org.apache.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:480)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:379)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:257)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:524)
at
org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:47)
at
org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:52)
at
org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceValue(WorkbookEvaluator.java:411)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:392)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:257)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:524)
at
org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:47)
at
org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:52)
at
org.apache.poi.hssf.record.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:47)
at
org.apache.poi.hssf.record.formula.functions.Hlookup.evaluate(Hlookup.java:58)
at
org.apache.poi.hssf.record.formula.eval.FunctionEval.evaluate(FunctionEval.java:247)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:374)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:257)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:524)
at
org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:47)
I don't know why the sheet name is invalid,please help me!
--
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
[Bug 48165] Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
Divya <ti...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from Divya <ti...@gmail.com> ---
I am facing the same issue. I have attached the file as well the external
referenced file for which I am seeing this issue.
My code is similar to the code above and I am seeing the exact same exception.
I have copied my stacktrace here.
Anyhelp is greatly appreciated.
java.lang.RuntimeException: Invalid sheet name 'Dates' in bool
'ACCOUNTS_DELIVERY_CLT.xls'.
at
org.apache.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:93)
at
org.apache.poi.ss.formula.OperationEvaluationContext.getRef3DEval(OperationEvaluationContext.java:249)
at
org.apache.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:607)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:493)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:287)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:229)
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCellValue(HSSFFormulaEvaluator.java:354)
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCell(HSSFFormulaEvaluator.java:216)
at imgrdatamodifier.UpdateExcelFile.updateFile(UpdateExcelFile.java:84)
at imgrdatamodifier.UpdateExcelFile.main(UpdateExcelFile.java:32)
--
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
[Bug 48165] Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
--- Comment #5 from Divya <ti...@gmail.com> ---
I did some debugging. The exception is thrown by the POI code as it seems to
get an index <0 for the particular sheet in the external workbook.
When I call the getSheetIndex function for the external sheet in question
separately it returns a valid index (>0) but for some reason poi function
ss.formula.OperationEvaluationContext.createExternalSheetRefEvaluator(...) is
not able to get the correct index for the sheet when it is called to evaluate
the formula.
Please Help.
--
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 48165] Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2011-06-25 12:37:11 UTC ---
Please attached the problematic file, without it we can't do much to help you.
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
[Bug 48165] Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
Divya <ti...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tiwari.divya@gmail.com
Version|3.5-FINAL |3.8
OS|Windows XP |Windows 7
--
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
[Bug 48165] Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
--- Comment #3 from Divya <ti...@gmail.com> ---
Created attachment 29456
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29456&action=edit
The File and the external referneced file
The files are attached.
Please take a look and let me know.
--
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
[Bug 48165] Invalid sheet name '1.2.1_LNE' in bool
'1_Structure_Data.xls'.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48165
Divya <ti...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #4 from Divya <ti...@gmail.com> ---
Is there any update to this?
--
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