poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58801] POI 3.13 - Failed to open load xlsx file into XSSFWorkbook
Date Tue, 05 Jan 2016 08:36:16 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58801

--- Comment #2 from francesco.petruzzi@innovery.net ---
This is a known bug of windows excel. The generated xml can contain multiple
instances of the same attribute in a single tag. The only workaround I found is
to modify the org.apache.xmlbeans.impl.piccolo.xml.AttributeHolder class in
order to ignore duplicate attributes.
Example:
public void addAndCheckAttribute(String uri, String localName, String qName,
String type, String value)    throws SAXException
{
  for (int i = 0; i < this.length; ++i) {
    if (this.data[(i * 5 + 2)] == qName) {
     //throw new FatalParsingException("duplicate attribute '" + qName + "'");
       setAttribute(i, uri, localName, qName, type, value);
    }
  }
  addAttribute(uri, localName, qName, type, value);
}

-- 
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


Mime
View raw message