Discussion:
3.12 org.apache.poi.ss.formula.FormulaParseException
Brian Milnes
2015-12-03 20:41:53 UTC
Permalink
Folks,

I have a strange bug that I can't quite grasp.

org.apache.poi.ss.formula.FormulaParseException: Unused input [[llave]]
after attempting to parse the formula [[1]!tbltipoentidad[llave]]
at
org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1577)
at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:145)
at
org.apache.poi.xssf.usermodel.helpers.XSSFFormulaUtils.updateName(XSSFFormulaUtils.java:116)
at
org.apache.poi.xssf.usermodel.helpers.XSSFFormulaUtils.updateSheetName(XSSFFormulaUtils.java:70)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.setSheetName(XSSFWorkbook.java:1439)

I could not find the string involved with searching or dumping
strings/formulas using POI until I rewrote the sheet as a FOPS
and it is here in the XML.

....
<table:named-expression table:name="lsTipoEntidad"
table:base-cell-address="$&apos;9&apos;.$A$1"
table:expression="[1]!tbltipoentidad[llave]"/>
</table:named-expressions>

Can anyone tell me something of what's going on?

Where is this object in the XLSX data structures and why is it not parsing
correctly as a formula? Should it be a formula?

Thanks, Brian
Nick Burch
2015-12-03 21:57:05 UTC
Permalink
Post by Brian Milnes
I have a strange bug that I can't quite grasp.
org.apache.poi.ss.formula.FormulaParseException: Unused input [[llave]]
after attempting to parse the formula [[1]!tbltipoentidad[llave]]
Do you know what the formula is supposed to mean, and what Excel evaluates
it as?
Post by Brian Milnes
I could not find the string involved with searching or dumping
strings/formulas using POI until I rewrote the sheet as a FOPS
and it is here in the XML.
Probably the best way to find it without changing things is to save as
.xlsx (if not already), rename to .zip, unzip, and check the sheet xml
files

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Brian Milnes
2015-12-03 22:36:34 UTC
Permalink
Nick,

Ah fun bug, it's in the workbook:

As I don't know how to correctly elide the format, I'll send you the long
text.

It seems to be a defined name, perhaps some type of print area?

Thanks, Brian

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="x15" xmlns:x15="
http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">
<fileVersion appName="xl" lastEdited="6" lowestEdited="4"
rupBuild="14420"/>
<workbookPr defaultThemeVersion="124226"/>
<mc:AlternateContent xmlns:mc="
http://schemas.openxmlformats.org/markup-compatibility/2006">
<mc:Choice Requires="x15">
<x15ac:absPath url="C:\Users\Enrique
Beltran\Documents\alpopular\Content\Content S1\Excel\" xmlns:x15ac="
http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/>
</mc:Choice>
</mc:AlternateContent>
<bookViews>
<workbookView xWindow="0" yWindow="0" windowWidth="20490"
windowHeight="7755" tabRatio="917" activeTab="8"/>
</bookViews>
<sheets>
<sheet name="105000" sheetId="151" r:id="rId1"/>
<sheet name="110000" sheetId="152" r:id="rId2"/>
<sheet name="220000" sheetId="154" r:id="rId3"/>
<sheet name="320000" sheetId="156" r:id="rId4"/>
<sheet name="410000" sheetId="161" r:id="rId5"/>
<sheet name="510000" sheetId="188" r:id="rId6"/>
<sheet name="520000" sheetId="187" r:id="rId7"/>
<sheet name="610000" sheetId="160" r:id="rId8"/>
<sheet name="610000a" sheetId="189" r:id="rId9"/>
<sheet name="810000" sheetId="186" r:id="rId10"/>
<sheet name="813000" sheetId="61" r:id="rId11"/>
<sheet name="819100" sheetId="185" r:id="rId12"/>
</sheets>
<externalReferences>
<externalReference r:id="rId13"/>
</externalReferences>
<definedNames>
<definedName name="_xlnm._FilterDatabase" localSheetId="7"
hidden="1">'610000'!$A$10:$DF$27</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="0">'105000'!$A$1:$C$8</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="1">'110000'!$A$1:$C$20</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="2">'220000'!$A$1:$C$52</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="3">'320000'!$A$1:$C$41</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="4">'410000'!$A$1:$F$36</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="5">'510000'!$A$1:$C$77</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="6">'520000'!$A$1:$C$83</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="7">'610000'!$A$1:$DF$27</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="9">'810000'!$A$1:$H$90</definedName>
<definedName name="_xlnm.Print_Area"
localSheetId="11">'819100'!#REF!</definedName>
<definedName
name="lsTipoEntidad">[1]!tblTipoEntidad[Llave]</definedName>
</definedNames>
<calcPr calcId="152511"/>
</workbook>
Post by Nick Burch
Post by Brian Milnes
I have a strange bug that I can't quite grasp.
org.apache.poi.ss.formula.FormulaParseException: Unused input [[llave]]
after attempting to parse the formula [[1]!tbltipoentidad[llave]]
Do you know what the formula is supposed to mean, and what Excel evaluates
it as?
I could not find the string involved with searching or dumping
Post by Brian Milnes
strings/formulas using POI until I rewrote the sheet as a FOPS
and it is here in the XML.
Probably the best way to find it without changing things is to save as
.xlsx (if not already), rename to .zip, unzip, and check the sheet xml files
Nick
---------------------------------------------------------------------
--
Brian Milnes
CIO XBRL Cloud
206 406 7576
Nick Burch
2015-12-03 22:42:10 UTC
Permalink
Post by Brian Milnes
As I don't know how to correctly elide the format, I'll send you the long
text.
It seems to be a defined name, perhaps some type of print area?
Looks to be a named range

What do you get if, on the first sheet, you just type into a cell
=lsTipoEntidad

(lsTipoEntidad is the name of the range)
Post by Brian Milnes
<definedName
name="lsTipoEntidad">[1]!tblTipoEntidad[Llave]</definedName>
Thanks
Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Brian Milnes
2015-12-03 23:40:18 UTC
Permalink
Nick,

It evaluates to #NAME as it's a broken formula of some type.

For my purposes, I can just delete the names from the workbook now that
I've found
out where this odd bug is.

But you might consider what the formula parser should do.

Thanks, Brian
Post by Nick Burch
Post by Brian Milnes
As I don't know how to correctly elide the format, I'll send you the long
text.
It seems to be a defined name, perhaps some type of print area?
Looks to be a named range
What do you get if, on the first sheet, you just type into a cell
=lsTipoEntidad
(lsTipoEntidad is the name of the range)
<definedName
Post by Brian Milnes
name="lsTipoEntidad">[1]!tblTipoEntidad[Llave]</definedName>
Thanks
Nick
---------------------------------------------------------------------
--
Brian Milnes
CIO XBRL Cloud
206 406 7576
Nick Burch
2015-12-03 23:59:13 UTC
Permalink
Post by Brian Milnes
It evaluates to #NAME as it's a broken formula of some type.
If you take the same string, and type it into a new formula, can Excel
cope? Does it accept it, or error?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Brian Milnes
2015-12-04 00:23:41 UTC
Permalink
Nick,

=tblTipoEntidad breaks, if I have the syntax right.

Any idea why this is an unparsable macro?

Thanks for all the help, I'm up and running, B
Post by Nick Burch
Post by Brian Milnes
It evaluates to #NAME as it's a broken formula of some type.
If you take the same string, and type it into a new formula, can Excel
cope? Does it accept it, or error?
Nick
---------------------------------------------------------------------
--
Brian Milnes
CIO XBRL Cloud
206 406 7576
Loading...