@Beta public class XDDFPath { private CTPath2D path; @Internal protected XDDFPath(CTPath2D path) { this.path = path; } @Internal public CTPath2D getXmlObject() { return path; } }
@Beta public class XDDFScene3D { private CTScene3D scene; protected XDDFScene3D(CTScene3D scene) { this.scene = scene; } @Internal public CTScene3D getXmlObject() { return scene; } }
@Beta public class XDDFPicture { private CTBlip blip; @Internal public XDDFPicture(CTBlip blip) { this.blip = blip; } @Internal public CTBlip getXmlObject() { return blip; } }
@Beta public interface XDDFAutoFit { int getFontScale(); int getLineSpaceReduction(); }
@Beta public interface TextContainer { <R> Optional<R> findDefinedParagraphProperty(Function<CTTextParagraphProperties, Boolean> isSet, Function<CTTextParagraphProperties, R> getter); <R> Optional<R> findDefinedRunProperty(Function<CTTextCharacterProperties, Boolean> isSet, Function<CTTextCharacterProperties, R> getter); }
@Beta public class XDDFConnectionSite { private CTConnectionSite site; @Internal protected XDDFConnectionSite(CTConnectionSite site) { this.site = site; } @Internal public CTConnectionSite getXmlObject() { return site; } }
@Beta public interface XDDFNumericalDataSource<T extends Number> extends XDDFDataSource<T> { String getFormatCode(); void setFormatCode(String formatCode); }
@Beta public XSSFPivotCache(CTPivotCache ctPivotCache) { super(); this.ctPivotCache = ctPivotCache; }
@Beta public void setPivotCacheRecords(XSSFPivotCacheRecords pivotCacheRecords) { this.pivotCacheRecords = pivotCacheRecords; }
@Beta public class XDDFEffectContainer { private CTEffectContainer container; @Internal public XDDFEffectContainer(CTEffectContainer container) { this.container = container; } @Internal public CTEffectContainer getXmlObject() { return container; } }
@Beta public class XDDFExtensionList { private CTOfficeArtExtensionList list; @Internal public XDDFExtensionList(CTOfficeArtExtensionList list) { this.list = list; } @Internal public CTOfficeArtExtensionList getXmlObject() { return list; } }
@Beta @Internal public CTPivotTableDefinition getCTPivotTableDefinition() { return pivotTableDefinition; }
@Beta public XSSFPivotCacheDefinition(){ super(); ctPivotCacheDefinition = CTPivotCacheDefinition.Factory.newInstance(); createDefaultValues(); }
/** * Returns all the pivot tables for this Sheet */ @Beta public List<XSSFPivotTable> getPivotTables() { List<XSSFPivotTable> tables = new ArrayList<>(); for (XSSFPivotTable table : getWorkbook().getPivotTables()) { if (table.getParent() == this) { tables.add(table); } } return tables; }
@Beta public List<Integer> getRowLabelColumns() { if (pivotTableDefinition.getRowFields() != null) { List<Integer> columnIndexes = new ArrayList<>(); for (CTField f : pivotTableDefinition.getRowFields().getFieldArray()) { columnIndexes.add(f.getX()); } return columnIndexes; } else { return Collections.emptyList(); } }
@Beta protected void readFrom(InputStream is) throws IOException { try { XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS); //Removing root element options.setLoadReplaceDocumentElement(null); ctPivotCache = CTPivotCache.Factory.parse(is, options); } catch (XmlException e) { throw new IOException(e.getLocalizedMessage()); } }
@Beta public void readFrom(InputStream is) throws IOException { try { XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS); //Removing root element options.setLoadReplaceDocumentElement(null); ctPivotCacheDefinition = CTPivotCacheDefinition.Factory.parse(is, options); } catch (XmlException e) { throw new IOException(e.getLocalizedMessage(), e); } }
@Beta private void createDefaultValues() { ctPivotCacheDefinition.setCreatedVersion(XSSFPivotTable.CREATED_VERSION); ctPivotCacheDefinition.setMinRefreshableVersion(XSSFPivotTable.MIN_REFRESHABLE_VERSION); ctPivotCacheDefinition.setRefreshedVersion(XSSFPivotTable.UPDATED_VERSION); ctPivotCacheDefinition.setRefreshedBy("Apache POI"); ctPivotCacheDefinition.setRefreshedDate(new Date().getTime()); ctPivotCacheDefinition.setRefreshOnLoad(true); }
@Beta protected XSSFPivotTable() { super(); pivotTableDefinition = CTPivotTableDefinition.Factory.newInstance(); pivotCache = new XSSFPivotCache(); pivotCacheDefinition = new XSSFPivotCacheDefinition(); pivotCacheRecords = new XSSFPivotCacheRecords(); }
/** * Create a pivot table using the Table, at the given position. * Tables are required to have a sheet reference, so no additional logic around reference sheet is needed. * @param source location of pivot data * @param position A reference to the top left cell where the pivot table will start * @return The pivot table */ @Beta public XSSFPivotTable createPivotTable(final Table source, CellReference position) { return createPivotTable(position, getWorkbook().getSheet(source.getSheetName()), wsSource -> wsSource.setName(source.getName())); }