Package org.apache.poi

Examples of org.apache.poi.POIXMLException


                        src.getCoreXf().toString()
                  );
                  // Swap it over
                  _stylesSource.replaceCellXfAt(_cellXfId, _cellXf);
               } catch(XmlException e) {
                  throw new POIXMLException(e);
               }
              
               // Copy the format
               String fmt = src.getDataFormatString();
               setDataFormat(
                     (new XSSFDataFormat(_stylesSource)).getFormat(fmt)
               );
              
               // Copy the font
               try {
                  CTFont ctFont = CTFont.Factory.parse(
                        src.getFont().getCTFont().toString()
                  );
                  XSSFFont font = new XSSFFont(ctFont);
                  font.registerTo(_stylesSource);
                  setFont(font);
               } catch(XmlException e) {
                  throw new POIXMLException(e);
               }
            }
           
            // Clear out cached details
            _font = null;
View Full Code Here


          if(pict instanceof XmlAnyTypeImpl) {
             // Pesky XmlBeans bug - see Bugzilla #49934
             try {
                pict = CTPicture.Factory.parse( pict.toString() );
             } catch(XmlException e) {
                throw new POIXMLException(e);
             }
          }
          if(pict instanceof CTPicture) {
             pictures.add((CTPicture)pict);
          }
View Full Code Here

          for(CTAbstractNum ctAbstractNum : ctNumbering.getAbstractNumList()){
            abstractNums.add(new XWPFAbstractNum(ctAbstractNum, this));
          }
          isNew = false;
    } catch (XmlException e) {
      throw new POIXMLException();
    }
  }
View Full Code Here

      stylesDoc = StylesDocument.Factory.parse(is);
          ctStyles = stylesDoc.getStyles();
          latentStyles = new XWPFLatentStyles(ctStyles.getLatentStyles(), this);
         
    } catch (XmlException e) {
      throw new POIXMLException();
    }
        //get any Style
        for(CTStyle style : ctStyles.getStyleList()) {
            listStyle.add(new XWPFStyle(style, this));
        }
View Full Code Here

    @Override
    protected void onDocumentRead() {
        try {
            read(getPackagePart().getInputStream());
        } catch (IOException e){
            throw new POIXMLException(e);
        }
    }
View Full Code Here

    protected void read(InputStream is) throws IOException {
        try {
            worksheet = WorksheetDocument.Factory.parse(is).getWorksheet();
        } catch (XmlException e){
            throw new POIXMLException(e);
        }

        initRows(worksheet);
        columnHelper = new ColumnHelper(worksheet);
View Full Code Here

                }

                hyperlinks.add( new XSSFHyperlink(hyperlink, hyperRel) );
            }
        } catch (InvalidFormatException e){
            throw new POIXMLException(e);
        }
    }
View Full Code Here

                }
            }

            initHyperlinks();
        } catch (XmlException e) {
            throw new POIXMLException(e);
        }
        // create for every Graphic-Part in Package a new XWPFGraphic
        getAllPictures();
    }
View Full Code Here

            while(relIter.hasNext()) {
                PackageRelationship rel = relIter.next();
                hyperlinks.add(new XWPFHyperlink(rel.getId(), rel.getTargetURI().toString()));
            }
        } catch (InvalidFormatException e){
            throw new POIXMLException(e);
        }
    }
View Full Code Here

            pkg.getPackageProperties().setCreatorProperty(DOCUMENT_CREATOR);

            return pkg;
        } catch (Exception e){
            throw new POIXMLException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.POIXMLException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.