Examples of Sxview


Examples of com.extentech.formats.XLS.Sxview

   * @param bk
   * @param sheet
   * @param ii
   */
  public static PivotTableHandle parseOOXML(WorkBookHandle bk, /*Object cacheid, */Boundsheet sheet, InputStream ii) {
    Sxview ptview= null;
   
    try {
      XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
      factory.setNamespaceAware(true);
      XmlPullParser xpp = factory.newPullParser();
      xpp.setInput(ii, null); // using XML 1.0 specification
      int eventType = xpp.getEventType();

      while (eventType != XmlPullParser.END_DOCUMENT) {
        if (eventType == XmlPullParser.START_TAG) {
          String tnm = xpp.getName();
          if (tnm.equals("pivotTableDefinition")) { // get attributes
            String cacheId= "", tablename= "";
            for (int z= 0; z < xpp.getAttributeCount(); z++) {
              String nm = xpp.getAttributeName(z);
              String v = xpp.getAttributeValue(z);
              if (nm.equals("name"))
                tablename= v;
              else if (nm.equals("cacheId")) {
                cacheId= v;
              }
              //dataOnRows
              //applyNumberFormats
              //applyBorderFormats
              //applyFontFormats
              //applyPatternFormats
              //applyAlignmentFormats
              //applyWidthHeightFormats
              //dataCaption
              //updatedVersion
              //showMemberPropertyTips
              //useAutoFormatting
              //itemPrintTitles
              //createdVersion
              //indent
              //compact
              //compactData
              //gridDropZones
            }
// KSC: TESTING!!!
cacheId="0";           
            short cid=(short)  (Integer.valueOf(cacheId).shortValue() );
            SxStreamID ptstream= bk.getWorkBook().getPivotStream(cid + 1);
            ptview= sheet.addPivotTable(ptstream.getCellRange().toString(), bk, cid + 1, tablename);
            ptview.setDataName("Values")// default
            ptview.setICache(cid);
          } else if (tnm.equals("location")) {
            parseLocationOOXML(xpp, ptview, bk);
          } else if (tnm.equals("pivotFields")) { // Represents the collection of fields that appear on the PivotTable.
            parsePivotFields(xpp, ptview);
          } else if (tnm.equals("pageFields")) {  // Represents the collection of items in the page or report filter region of the PivotTable.
View Full Code Here

Examples of com.extentech.formats.XLS.Sxview

        @param String name of the PivotTable
        @return PivotTable the PivotTable
    */
    public PivotTableHandle getPivotTable(String ptname)
    throws PivotTableNotFoundException{
        Sxview st = mybook.getPivotTableView(ptname);
        if(st==null)throw new PivotTableNotFoundException(ptname);
        return new PivotTableHandle(st, this);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.