spire-xls 15.5.0__py3-none-manylinux2014_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spire/__init__.py +0 -0
- spire/xls/AddInFunctionsCollection.py +29 -0
- spire/xls/AddtionalFormatWrapper.py +976 -0
- spire/xls/AlertStyleType.py +18 -0
- spire/xls/ArcShapeCollection.py +70 -0
- spire/xls/AutoFiltersCollection.py +527 -0
- spire/xls/AutoFitterOptions.py +66 -0
- spire/xls/AutoFormatOptions.py +23 -0
- spire/xls/AutoFormatType.py +32 -0
- spire/xls/AutoSortScope.py +25 -0
- spire/xls/Average.py +29 -0
- spire/xls/AverageType.py +25 -0
- spire/xls/AxisLineIdentifierType.py +19 -0
- spire/xls/AxisTextDirectionType.py +18 -0
- spire/xls/AxisType.py +18 -0
- spire/xls/AxisTypes.py +18 -0
- spire/xls/BaseFormatType.py +17 -0
- spire/xls/BordersCollection.py +158 -0
- spire/xls/BordersCollectionArrayWrapper.py +95 -0
- spire/xls/BordersLineType.py +23 -0
- spire/xls/BubbleSizeType.py +17 -0
- spire/xls/BuiltInDocumentProperties.py +12 -0
- spire/xls/BuiltInPropertyType.py +50 -0
- spire/xls/BuiltInStyles.py +66 -0
- spire/xls/ButtonShapeCollection.py +70 -0
- spire/xls/CategoryType.py +18 -0
- spire/xls/CellBaseStyle.py +26 -0
- spire/xls/CellBorder.py +154 -0
- spire/xls/CellDataType.py +23 -0
- spire/xls/CellFormatType.py +21 -0
- spire/xls/CellRange.py +915 -0
- spire/xls/CellStyle.py +85 -0
- spire/xls/CellStyleFlag.py +432 -0
- spire/xls/CellStyleObject.py +617 -0
- spire/xls/CellValueChangedEventArgs.py +75 -0
- spire/xls/CellValueChangedEventHandler.py +52 -0
- spire/xls/Chart.py +404 -0
- spire/xls/ChartArea.py +61 -0
- spire/xls/ChartBackgroundMode.py +18 -0
- spire/xls/ChartBaseUnitType.py +18 -0
- spire/xls/ChartBorder.py +12 -0
- spire/xls/ChartCategoryAxis.py +93 -0
- spire/xls/ChartDataLabels.py +42 -0
- spire/xls/ChartDataPoint.py +42 -0
- spire/xls/ChartDataPointsCollection.py +75 -0
- spire/xls/ChartDataTable.py +12 -0
- spire/xls/ChartDisplayUnitType.py +26 -0
- spire/xls/ChartDropBar.py +12 -0
- spire/xls/ChartFormat.py +72 -0
- spire/xls/ChartFormatCollection.py +59 -0
- spire/xls/ChartGridLine.py +27 -0
- spire/xls/ChartInterior.py +12 -0
- spire/xls/ChartLegend.py +42 -0
- spire/xls/ChartLegendEntriesColl.py +128 -0
- spire/xls/ChartLegendEntry.py +27 -0
- spire/xls/ChartLinePatternType.py +24 -0
- spire/xls/ChartLineWeightType.py +19 -0
- spire/xls/ChartMarkerType.py +27 -0
- spire/xls/ChartPageSetup.py +12 -0
- spire/xls/ChartParagraphType.py +18 -0
- spire/xls/ChartPieType.py +18 -0
- spire/xls/ChartPlotArea.py +53 -0
- spire/xls/ChartPlotEmptyType.py +18 -0
- spire/xls/ChartSerie.py +142 -0
- spire/xls/ChartSerieDataFormat.py +56 -0
- spire/xls/ChartSeries.py +154 -0
- spire/xls/ChartSeriesAxis.py +72 -0
- spire/xls/ChartShadow.py +235 -0
- spire/xls/ChartSheet.py +285 -0
- spire/xls/ChartTextArea.py +782 -0
- spire/xls/ChartTitle.py +12 -0
- spire/xls/ChartValueAxis.py +92 -0
- spire/xls/ChartWallOrFloor.py +12 -0
- spire/xls/ChartsCollection.py +113 -0
- spire/xls/CheckBoxCollection.py +70 -0
- spire/xls/CheckState.py +18 -0
- spire/xls/CollectionBase.py +184 -0
- spire/xls/CollectionChangeEventArgs.py +36 -0
- spire/xls/CollectionExtended.py +92 -0
- spire/xls/ColorConditionValue.py +91 -0
- spire/xls/ColorFilter.py +45 -0
- spire/xls/ColorScale.py +172 -0
- spire/xls/ColorType.py +18 -0
- spire/xls/ComboBoxCollection.py +70 -0
- spire/xls/CommentHAlignType.py +21 -0
- spire/xls/CommentVAlignType.py +20 -0
- spire/xls/CommentsCollection.py +109 -0
- spire/xls/CommentsRange.py +578 -0
- spire/xls/CommonWrapper.py +40 -0
- spire/xls/ComparisonOperatorType.py +24 -0
- spire/xls/CompoundLineType.py +18 -0
- spire/xls/CondFormatCollectionWrapper.py +125 -0
- spire/xls/ConditionValue.py +82 -0
- spire/xls/ConditionValuePosition.py +16 -0
- spire/xls/ConditionValueType.py +20 -0
- spire/xls/ConditionalFormat.py +14 -0
- spire/xls/ConditionalFormatScope.py +16 -0
- spire/xls/ConditionalFormatType.py +33 -0
- spire/xls/ConditionalFormatWrapper.py +986 -0
- spire/xls/ConditionalFormats.py +55 -0
- spire/xls/ConditionalTopNType.py +17 -0
- spire/xls/ConnectionDataSourceType.py +26 -0
- spire/xls/ConverterSetting.py +347 -0
- spire/xls/CopyRangeOptions.py +23 -0
- spire/xls/CustomFilter.py +147 -0
- spire/xls/CustomFilterCollection.py +113 -0
- spire/xls/DBConnection.py +198 -0
- spire/xls/DVAspect.py +15 -0
- spire/xls/DataBar.py +220 -0
- spire/xls/DataBarAxisPosition.py +16 -0
- spire/xls/DataBarBorder.py +47 -0
- spire/xls/DataBarBorderType.py +15 -0
- spire/xls/DataBarFillType.py +15 -0
- spire/xls/DataBarNegativeColorType.py +15 -0
- spire/xls/DataConnections.py +25 -0
- spire/xls/DataLabelPositionType.py +26 -0
- spire/xls/DataMarkerDirection.py +17 -0
- spire/xls/DataSorter.py +154 -0
- spire/xls/DataSourceType.py +19 -0
- spire/xls/DateTimeGroupItem.py +132 -0
- spire/xls/DateTimeGroupingType.py +19 -0
- spire/xls/DeleteOption.py +15 -0
- spire/xls/DocumentProperty.py +304 -0
- spire/xls/DropLineStyleType.py +18 -0
- spire/xls/DynamicFilter.py +71 -0
- spire/xls/DynamicFilterType.py +48 -0
- spire/xls/EncryptedKeyInfo.py +12 -0
- spire/xls/ErrorBarIncludeType.py +19 -0
- spire/xls/ErrorBarType.py +20 -0
- spire/xls/Excel2016Charttype.py +20 -0
- spire/xls/ExcelAddInFunction.py +12 -0
- spire/xls/ExcelCalculationMode.py +18 -0
- spire/xls/ExcelChartType.py +96 -0
- spire/xls/ExcelClearOptions.py +18 -0
- spire/xls/ExcelColors.py +121 -0
- spire/xls/ExcelComboType.py +22 -0
- spire/xls/ExcelComment.py +27 -0
- spire/xls/ExcelCommentObject.py +618 -0
- spire/xls/ExcelFindOptions.py +16 -0
- spire/xls/ExcelFont.py +310 -0
- spire/xls/ExcelGradient.py +174 -0
- spire/xls/ExcelHorizontalAlignment.py +21 -0
- spire/xls/ExcelInterior.py +128 -0
- spire/xls/ExcelPatternType.py +52 -0
- spire/xls/ExcelPicture.py +12 -0
- spire/xls/ExcelQuartileCalculation.py +17 -0
- spire/xls/ExcelSaveType.py +15 -0
- spire/xls/ExcelShapeType.py +41 -0
- spire/xls/ExcelSheetType.py +20 -0
- spire/xls/ExcelTotalsCalculation.py +23 -0
- spire/xls/ExcelTreeMapLabelOption.py +18 -0
- spire/xls/ExcelVersion.py +24 -0
- spire/xls/ExcelVerticalAlignment.py +21 -0
- spire/xls/ExpandCollapseFlags.py +18 -0
- spire/xls/ExportTableOptions.py +74 -0
- spire/xls/ExternalConnection.py +147 -0
- spire/xls/ExternalLink.py +58 -0
- spire/xls/ExternalLinkCollection.py +25 -0
- spire/xls/FileFormat.py +40 -0
- spire/xls/FillPictureType.py +16 -0
- spire/xls/FilterColumn.py +258 -0
- spire/xls/FilterConditionType.py +21 -0
- spire/xls/FilterDataType.py +22 -0
- spire/xls/FilterOperatorType.py +20 -0
- spire/xls/FilterType.py +20 -0
- spire/xls/FindType.py +19 -0
- spire/xls/Font.py +376 -0
- spire/xls/FontArrayWrapper.py +265 -0
- spire/xls/FontUnderlineType.py +20 -0
- spire/xls/FontVertialAlignmentType.py +20 -0
- spire/xls/FontWrapper.py +450 -0
- spire/xls/FontsCollection.py +87 -0
- spire/xls/Format3D.py +235 -0
- spire/xls/GeomertyAdjustValue.py +63 -0
- spire/xls/GeomertyAdjustValueFormulaType.py +30 -0
- spire/xls/GeomertyAdjustValuesCollection.py +39 -0
- spire/xls/GetText.py +15 -0
- spire/xls/GoalSeek.py +65 -0
- spire/xls/GoalSeekResult.py +57 -0
- spire/xls/GradientArrayWrapper.py +188 -0
- spire/xls/GradientColorType.py +18 -0
- spire/xls/GradientPatternType.py +64 -0
- spire/xls/GradientPresetType.py +39 -0
- spire/xls/GradientStops.py +146 -0
- spire/xls/GradientStyleType.py +21 -0
- spire/xls/GradientTextureType.py +40 -0
- spire/xls/GradientType.py +17 -0
- spire/xls/GradientVariantsType.py +19 -0
- spire/xls/GroupBoxCollection.py +70 -0
- spire/xls/GroupByType.py +15 -0
- spire/xls/GroupShape.py +21 -0
- spire/xls/GroupShapeCollection.py +46 -0
- spire/xls/HPageBreak.py +32 -0
- spire/xls/HPageBreaksCollection.py +108 -0
- spire/xls/HTMLOptions.py +144 -0
- spire/xls/HistogramAxisFormat.py +30 -0
- spire/xls/HorizontalAlignType.py +23 -0
- spire/xls/HttpContentType.py +18 -0
- spire/xls/HyperLink.py +32 -0
- spire/xls/HyperLinkType.py +20 -0
- spire/xls/HyperLinksCollection.py +72 -0
- spire/xls/IAddInFunction.py +22 -0
- spire/xls/IAddInFunctions.py +50 -0
- spire/xls/IArcShape.py +259 -0
- spire/xls/IArcShapes.py +50 -0
- spire/xls/IAutoFilter.py +167 -0
- spire/xls/IAutoFilterCondition.py +123 -0
- spire/xls/IAutoFilters.py +49 -0
- spire/xls/IBorder.py +116 -0
- spire/xls/IBorders.py +106 -0
- spire/xls/IBuiltInDocumentProperties.py +579 -0
- spire/xls/IButtonShape.py +12 -0
- spire/xls/IButtonShapes.py +50 -0
- spire/xls/IChart.py +1368 -0
- spire/xls/IChartAxis.py +722 -0
- spire/xls/IChartBorder.py +220 -0
- spire/xls/IChartCategoryAxis.py +410 -0
- spire/xls/IChartDataLabels.py +457 -0
- spire/xls/IChartDataPoint.py +131 -0
- spire/xls/IChartDataPoints.py +31 -0
- spire/xls/IChartDataTable.py +197 -0
- spire/xls/IChartDropBar.py +12 -0
- spire/xls/IChartErrorBars.py +373 -0
- spire/xls/IChartFillBorder.py +303 -0
- spire/xls/IChartFormat.py +571 -0
- spire/xls/IChartFrameFormat.py +93 -0
- spire/xls/IChartGridLine.py +107 -0
- spire/xls/IChartInterior.py +278 -0
- spire/xls/IChartLegend.py +499 -0
- spire/xls/IChartLegendEntries.py +30 -0
- spire/xls/IChartLegendEntry.py +178 -0
- spire/xls/IChartPageSetup.py +56 -0
- spire/xls/IChartSerie.py +779 -0
- spire/xls/IChartSerieDataFormat.py +566 -0
- spire/xls/IChartSeries.py +39 -0
- spire/xls/IChartSeriesAxis.py +128 -0
- spire/xls/IChartShape.py +92 -0
- spire/xls/IChartShapes.py +39 -0
- spire/xls/IChartTextArea.py +197 -0
- spire/xls/IChartTrendLine.py +548 -0
- spire/xls/IChartTrendLines.py +79 -0
- spire/xls/IChartValueAxis.py +518 -0
- spire/xls/IChartWallOrFloor.py +32 -0
- spire/xls/ICharts.py +70 -0
- spire/xls/ICheckBox.py +96 -0
- spire/xls/ICheckBoxes.py +50 -0
- spire/xls/ICloneParent.py +28 -0
- spire/xls/IColorConditionValue.py +31 -0
- spire/xls/IColorScale.py +32 -0
- spire/xls/ICombinedRange.py +87 -0
- spire/xls/IComboBoxShape.py +95 -0
- spire/xls/IComboBoxes.py +50 -0
- spire/xls/IComment.py +85 -0
- spire/xls/ICommentShape.py +12 -0
- spire/xls/IComments.py +50 -0
- spire/xls/IConditionValue.py +68 -0
- spire/xls/IConditionalFormat.py +606 -0
- spire/xls/IConditionalFormats.py +48 -0
- spire/xls/IConditionalFormatsCollection.py +134 -0
- spire/xls/ICustomDocumentProperties.py +128 -0
- spire/xls/IDataBar.py +105 -0
- spire/xls/IDataSort.py +95 -0
- spire/xls/IDataValidation.py +421 -0
- spire/xls/IDataValidationCollection.py +132 -0
- spire/xls/IDataValidationTable.py +68 -0
- spire/xls/IDigitalSignature.py +99 -0
- spire/xls/IDigitalSignatures.py +29 -0
- spire/xls/IDocumentProperty.py +226 -0
- spire/xls/IErrorIndicator.py +31 -0
- spire/xls/IExcelApplication.py +22 -0
- spire/xls/IExtendIndex.py +21 -0
- spire/xls/IExtendedFormat.py +530 -0
- spire/xls/IFont.py +271 -0
- spire/xls/IFormat3D.py +252 -0
- spire/xls/IGeomPath.py +23 -0
- spire/xls/IGeomPathInfo.py +112 -0
- spire/xls/IGeomPathShape.py +30 -0
- spire/xls/IGlow.py +85 -0
- spire/xls/IGradient.py +174 -0
- spire/xls/IGroupBox.py +67 -0
- spire/xls/IGroupBoxes.py +50 -0
- spire/xls/IHPageBreak.py +22 -0
- spire/xls/IHPageBreaks.py +31 -0
- spire/xls/IHyperLink.py +118 -0
- spire/xls/IHyperLinks.py +48 -0
- spire/xls/IIconSet.py +96 -0
- spire/xls/IInterior.py +117 -0
- spire/xls/IInternalAddtionalFormat.py +238 -0
- spire/xls/IInternalFont.py +31 -0
- spire/xls/IInternalWorksheet.py +132 -0
- spire/xls/ILabelShape.py +49 -0
- spire/xls/ILabelShapes.py +50 -0
- spire/xls/ILineShape.py +305 -0
- spire/xls/ILines.py +50 -0
- spire/xls/IListBox.py +86 -0
- spire/xls/IListBoxes.py +50 -0
- spire/xls/IListObject.py +493 -0
- spire/xls/IListObjectColumn.py +222 -0
- spire/xls/IListObjects.py +31 -0
- spire/xls/IMarkersDesigner.py +113 -0
- spire/xls/IMigrantRange.py +21 -0
- spire/xls/INameRanges.py +162 -0
- spire/xls/INamedObject.py +22 -0
- spire/xls/INamedRange.py +162 -0
- spire/xls/INumberFormat.py +77 -0
- spire/xls/IOleObject.py +176 -0
- spire/xls/IOleObjects.py +32 -0
- spire/xls/IOptimizedUpdate.py +28 -0
- spire/xls/IOvalShape.py +154 -0
- spire/xls/IOvalShapes.py +50 -0
- spire/xls/IPageSetup.py +195 -0
- spire/xls/IPageSetupBase.py +642 -0
- spire/xls/IPictureShape.py +99 -0
- spire/xls/IPictures.py +250 -0
- spire/xls/IPivotCache.py +41 -0
- spire/xls/IPivotCaches.py +39 -0
- spire/xls/IPivotCalculatedFields.py +50 -0
- spire/xls/IPivotDataField.py +68 -0
- spire/xls/IPivotDataFields.py +50 -0
- spire/xls/IPivotField.py +291 -0
- spire/xls/IPivotFields.py +41 -0
- spire/xls/IPivotTable.py +393 -0
- spire/xls/IPivotTableOptions.py +428 -0
- spire/xls/IPivotTables.py +68 -0
- spire/xls/IPropertyData.py +70 -0
- spire/xls/IPrstGeomShape.py +71 -0
- spire/xls/IPrstGeomShapes.py +81 -0
- spire/xls/IRadioButton.py +105 -0
- spire/xls/IRadioButtons.py +71 -0
- spire/xls/IRectangleShape.py +60 -0
- spire/xls/IRectangleShapes.py +50 -0
- spire/xls/IReflectionEffect.py +138 -0
- spire/xls/IRichTextString.py +93 -0
- spire/xls/IScrollBarShape.py +140 -0
- spire/xls/IScrollBarShapes.py +50 -0
- spire/xls/IShadow.py +244 -0
- spire/xls/IShape.py +409 -0
- spire/xls/IShapeFill.py +522 -0
- spire/xls/IShapeLineFormat.py +331 -0
- spire/xls/IShapes.py +270 -0
- spire/xls/ISortColumn.py +96 -0
- spire/xls/ISortColumns.py +70 -0
- spire/xls/ISortedRule.py +112 -0
- spire/xls/ISparkline.py +68 -0
- spire/xls/ISparklineGroup.py +428 -0
- spire/xls/ISparklines.py +72 -0
- spire/xls/ISpinnerShape.py +102 -0
- spire/xls/ISpinnerShapes.py +50 -0
- spire/xls/IStyle.py +50 -0
- spire/xls/IStyles.py +69 -0
- spire/xls/ITabSheet.py +302 -0
- spire/xls/ITabSheets.py +57 -0
- spire/xls/ITextBox.py +116 -0
- spire/xls/ITextBoxLinkShape.py +40 -0
- spire/xls/ITextBoxShape.py +22 -0
- spire/xls/ITextBoxes.py +61 -0
- spire/xls/ITextFrame.py +120 -0
- spire/xls/IVPageBreak.py +22 -0
- spire/xls/IVPageBreaks.py +31 -0
- spire/xls/IWorkbook.py +1806 -0
- spire/xls/IWorksheet.py +2694 -0
- spire/xls/IWorksheetGroup.py +48 -0
- spire/xls/IWorksheets.py +159 -0
- spire/xls/IXLSRange.py +2479 -0
- spire/xls/IXLSRanges.py +35 -0
- spire/xls/IconSet.py +103 -0
- spire/xls/IconSetType.py +35 -0
- spire/xls/IgnoreErrorType.py +24 -0
- spire/xls/ImageFormatType.py +18 -0
- spire/xls/ImageLocationTypes.py +15 -0
- spire/xls/ImageType.py +17 -0
- spire/xls/ImportObjectOptions.py +89 -0
- spire/xls/InsertMoveOption.py +15 -0
- spire/xls/InsertOptionsType.py +16 -0
- spire/xls/InteriorArrayWrapper.py +126 -0
- spire/xls/LOGFONT.py +140 -0
- spire/xls/LabelShapeCollection.py +71 -0
- spire/xls/LegendPositionType.py +21 -0
- spire/xls/LegendSpacingType.py +18 -0
- spire/xls/LineCollection.py +85 -0
- spire/xls/LineShapeType.py +17 -0
- spire/xls/LineStyleType.py +29 -0
- spire/xls/ListBoxCollection.py +71 -0
- spire/xls/ListObjectCollection.py +45 -0
- spire/xls/MarkerDesigner.py +172 -0
- spire/xls/MeasureUnits.py +21 -0
- spire/xls/MsoPathInfo.py +38 -0
- spire/xls/MsoPathType.py +21 -0
- spire/xls/MultipleFilterCollection.py +166 -0
- spire/xls/NegativeBarFormat.py +82 -0
- spire/xls/OColor.py +165 -0
- spire/xls/OLEDBCommandType.py +19 -0
- spire/xls/OdsPageBackground.py +129 -0
- spire/xls/OdsPageBackgroundImagePositionType.py +22 -0
- spire/xls/OdsPageBackgroundImageType.py +16 -0
- spire/xls/OdsPageBackgroundType.py +16 -0
- spire/xls/OleLinkType.py +15 -0
- spire/xls/OleObjectType.py +51 -0
- spire/xls/OrderBy.py +19 -0
- spire/xls/OrderType.py +17 -0
- spire/xls/OvalShapeCollection.py +70 -0
- spire/xls/PageBreakExtentType.py +17 -0
- spire/xls/PageBreakType.py +18 -0
- spire/xls/PageColRow.py +48 -0
- spire/xls/PageOrientationType.py +17 -0
- spire/xls/PageSetup.py +14 -0
- spire/xls/PagesOrderType.py +17 -0
- spire/xls/PaperSizeEntry.py +30 -0
- spire/xls/PaperSizeType.py +135 -0
- spire/xls/PathFillMode.py +19 -0
- spire/xls/PdfConformanceLevel.py +20 -0
- spire/xls/PicStretch.py +104 -0
- spire/xls/PicTile.py +72 -0
- spire/xls/PicturesCollection.py +532 -0
- spire/xls/PivotAutoFomatTypes.py +35 -0
- spire/xls/PivotBuiltInStyles.py +97 -0
- spire/xls/PivotCache.py +12 -0
- spire/xls/PivotCachesCollection.py +12 -0
- spire/xls/PivotCalculatedFieldsCollection.py +38 -0
- spire/xls/PivotConditionalFormat.py +54 -0
- spire/xls/PivotConditionalFormatCollection.py +38 -0
- spire/xls/PivotDataField.py +118 -0
- spire/xls/PivotDataFields.py +104 -0
- spire/xls/PivotDataType.py +21 -0
- spire/xls/PivotField.py +12 -0
- spire/xls/PivotFieldFormatType.py +28 -0
- spire/xls/PivotFieldSortType.py +16 -0
- spire/xls/PivotGroupByTypes.py +23 -0
- spire/xls/PivotItem.py +161 -0
- spire/xls/PivotItemType.py +28 -0
- spire/xls/PivotLabelFilterType.py +27 -0
- spire/xls/PivotPageAreaFieldsOrderType.py +15 -0
- spire/xls/PivotReportFilter.py +92 -0
- spire/xls/PivotReportFilters.py +63 -0
- spire/xls/PivotStyle.py +79 -0
- spire/xls/PivotTable.py +12 -0
- spire/xls/PivotTableElement.py +38 -0
- spire/xls/PivotTableFields.py +85 -0
- spire/xls/PivotTableLayoutType.py +16 -0
- spire/xls/PivotTableStyle.py +63 -0
- spire/xls/PivotTablesCollection.py +12 -0
- spire/xls/PivotValueFilterType.py +21 -0
- spire/xls/PresetTextEffect.py +43 -0
- spire/xls/PrintCommentType.py +18 -0
- spire/xls/PrintErrorsType.py +19 -0
- spire/xls/PrintingPageType.py +16 -0
- spire/xls/PropertyType.py +31 -0
- spire/xls/PrstGeomShapeCollection.py +126 -0
- spire/xls/PrstGeomShapeType.py +201 -0
- spire/xls/QueryTableCollection.py +25 -0
- spire/xls/QueryTableXls.py +42 -0
- spire/xls/RTFCommentArray.py +112 -0
- spire/xls/RTFStringArray.py +112 -0
- spire/xls/RadioButtonCollection.py +137 -0
- spire/xls/RangeRichTextString.py +42 -0
- spire/xls/RangesCollection.py +537 -0
- spire/xls/ReadingOrderType.py +18 -0
- spire/xls/RectangleCollection.py +71 -0
- spire/xls/RectangleShapeType.py +22 -0
- spire/xls/RectangleStyleType.py +17 -0
- spire/xls/ReferRangeArea.py +88 -0
- spire/xls/RelationShip.py +15 -0
- spire/xls/RenameStrategy.py +16 -0
- spire/xls/ResizeBehaveType.py +18 -0
- spire/xls/RichText.py +49 -0
- spire/xls/RichTextObject.py +133 -0
- spire/xls/RichTextShape.py +168 -0
- spire/xls/RichTextString.py +126 -0
- spire/xls/RtfTags.py +30 -0
- spire/xls/RtfTextWriter.py +629 -0
- spire/xls/SaveShapeTypeOption.py +310 -0
- spire/xls/ScrollBarCollection.py +71 -0
- spire/xls/SelectionType.py +16 -0
- spire/xls/ShapeArrowLengthType.py +18 -0
- spire/xls/ShapeArrowStyleType.py +21 -0
- spire/xls/ShapeArrowWidthType.py +18 -0
- spire/xls/ShapeCollectionBase.py +87 -0
- spire/xls/ShapeDashLineStyleType.py +23 -0
- spire/xls/ShapeFillType.py +22 -0
- spire/xls/ShapeGeomPath.py +26 -0
- spire/xls/ShapeGlow.py +91 -0
- spire/xls/ShapeLayerChangeType.py +19 -0
- spire/xls/ShapeLineStyleType.py +20 -0
- spire/xls/ShapeReflection.py +131 -0
- spire/xls/ShapeSegmentPath.py +26 -0
- spire/xls/SheetProtectionType.py +33 -0
- spire/xls/SortColumn.py +120 -0
- spire/xls/SortColumns.py +185 -0
- spire/xls/SortComparsionType.py +19 -0
- spire/xls/SortOrientationType.py +17 -0
- spire/xls/SortedWayType.py +18 -0
- spire/xls/Sparkline.py +70 -0
- spire/xls/SparklineCollection.py +112 -0
- spire/xls/SparklineEmptyCells.py +16 -0
- spire/xls/SparklineGroup.py +523 -0
- spire/xls/SparklineGroupCollection.py +71 -0
- spire/xls/SparklineType.py +18 -0
- spire/xls/SpartlineVerticalAxisType.py +16 -0
- spire/xls/SpinnerShapeCollection.py +70 -0
- spire/xls/SplitType.py +19 -0
- spire/xls/StrikeThroughStyle.py +17 -0
- spire/xls/StringUtil.py +12 -0
- spire/xls/StyleArrayWrapper.py +621 -0
- spire/xls/StyleDefineType.py +15 -0
- spire/xls/StylesCollection.py +141 -0
- spire/xls/SubtotalTypes.py +26 -0
- spire/xls/TRangeValueType.py +19 -0
- spire/xls/TableBuiltInStyles.py +75 -0
- spire/xls/TextBoxCollection.py +70 -0
- spire/xls/TextBoxShapeBase.py +140 -0
- spire/xls/TextDirection.py +20 -0
- spire/xls/TextDirectionType.py +16 -0
- spire/xls/TextRotationType.py +19 -0
- spire/xls/TextSaveOptions.py +85 -0
- spire/xls/TextVerticalValue.py +19 -0
- spire/xls/ThemeColorType.py +27 -0
- spire/xls/TickLabelPositionType.py +19 -0
- spire/xls/TickMarkType.py +19 -0
- spire/xls/TimePeriodType.py +23 -0
- spire/xls/Top10Filter.py +75 -0
- spire/xls/TopBottom.py +44 -0
- spire/xls/TopBottomType.py +19 -0
- spire/xls/TopFormatType.py +18 -0
- spire/xls/TrendLineType.py +21 -0
- spire/xls/UnderlineStyle.py +32 -0
- spire/xls/UnknownVariableAction.py +18 -0
- spire/xls/UtilityMethods.py +55 -0
- spire/xls/VPageBreak.py +34 -0
- spire/xls/VPageBreaksCollection.py +96 -0
- spire/xls/Validation.py +33 -0
- spire/xls/ValidationComparisonOperator.py +23 -0
- spire/xls/VariableTypeAction.py +19 -0
- spire/xls/VerticalAlignType.py +20 -0
- spire/xls/ViewMode.py +18 -0
- spire/xls/WebQueryConnection.py +224 -0
- spire/xls/Workbook.py +3152 -0
- spire/xls/WorkbookObjectsCollection.py +25 -0
- spire/xls/Worksheet.py +1319 -0
- spire/xls/WorksheetChartsCollection.py +83 -0
- spire/xls/WorksheetConditionalFormats.py +12 -0
- spire/xls/WorksheetCopyType.py +31 -0
- spire/xls/WorksheetVisibility.py +18 -0
- spire/xls/WorksheetsCollection.py +341 -0
- spire/xls/WriteProtection.py +64 -0
- spire/xls/XLSXBorderJoinType.py +19 -0
- spire/xls/XLSXChartBevelType.py +26 -0
- spire/xls/XLSXChartLightingType.py +40 -0
- spire/xls/XLSXChartMaterialType.py +32 -0
- spire/xls/XLSXChartPrespectiveType.py +21 -0
- spire/xls/XLSXChartShadowInnerType.py +25 -0
- spire/xls/XLSXChartShadowOuterType.py +25 -0
- spire/xls/XLSXPivotItemType.py +28 -0
- spire/xls/XlsAddInFunction.py +78 -0
- spire/xls/XlsAddInFunctionsCollection.py +101 -0
- spire/xls/XlsArcShape.py +331 -0
- spire/xls/XlsAutoFiltersCollection.py +119 -0
- spire/xls/XlsBitmapShape.py +297 -0
- spire/xls/XlsBorder.py +172 -0
- spire/xls/XlsBorderArrayWrapper.py +116 -0
- spire/xls/XlsBordersCollection.py +101 -0
- spire/xls/XlsBuiltInDocumentProperties.py +639 -0
- spire/xls/XlsButtonShape.py +137 -0
- spire/xls/XlsChart.py +1510 -0
- spire/xls/XlsChartAxis.py +564 -0
- spire/xls/XlsChartBorder.py +165 -0
- spire/xls/XlsChartCategoryAxis.py +656 -0
- spire/xls/XlsChartDataLabelArea.py +387 -0
- spire/xls/XlsChartDataLabels.py +811 -0
- spire/xls/XlsChartDataPoint.py +108 -0
- spire/xls/XlsChartDataPointsCollection.py +120 -0
- spire/xls/XlsChartDataTable.py +393 -0
- spire/xls/XlsChartDropBar.py +301 -0
- spire/xls/XlsChartFill.py +571 -0
- spire/xls/XlsChartFormat.py +1069 -0
- spire/xls/XlsChartFormatCollection.py +162 -0
- spire/xls/XlsChartFrameFormat.py +614 -0
- spire/xls/XlsChartGridLine.py +171 -0
- spire/xls/XlsChartInterior.py +240 -0
- spire/xls/XlsChartLegend.py +355 -0
- spire/xls/XlsChartLegendArea.py +419 -0
- spire/xls/XlsChartLegendEntry.py +156 -0
- spire/xls/XlsChartPageSetup.py +56 -0
- spire/xls/XlsChartPlotArea.py +12 -0
- spire/xls/XlsChartSerie.py +589 -0
- spire/xls/XlsChartSerieDataFormat.py +1008 -0
- spire/xls/XlsChartSeries.py +111 -0
- spire/xls/XlsChartSeriesAxis.py +212 -0
- spire/xls/XlsChartShape.py +1142 -0
- spire/xls/XlsChartTitleArea.py +392 -0
- spire/xls/XlsChartValueAxis.py +317 -0
- spire/xls/XlsChartWallOrFloor.py +319 -0
- spire/xls/XlsChartsCollection.py +89 -0
- spire/xls/XlsCheckBoxShape.py +156 -0
- spire/xls/XlsComboBoxShape.py +128 -0
- spire/xls/XlsComment.py +234 -0
- spire/xls/XlsCommentsCollection.py +87 -0
- spire/xls/XlsConditionValue.py +111 -0
- spire/xls/XlsConditionalFormat.py +1119 -0
- spire/xls/XlsConditionalFormats.py +590 -0
- spire/xls/XlsDataValidationCollection.py +159 -0
- spire/xls/XlsDataValidationTable.py +105 -0
- spire/xls/XlsDocumentProperty.py +370 -0
- spire/xls/XlsEventArgs.py +93 -0
- spire/xls/XlsEventHandler.py +52 -0
- spire/xls/XlsFill.py +139 -0
- spire/xls/XlsFont.py +364 -0
- spire/xls/XlsFontStyle.py +12 -0
- spire/xls/XlsFontsCollection.py +51 -0
- spire/xls/XlsGradient.py +185 -0
- spire/xls/XlsGradientStop.py +85 -0
- spire/xls/XlsGroupBoxShape.py +88 -0
- spire/xls/XlsHPageBreak.py +105 -0
- spire/xls/XlsHPageBreaksCollection.py +85 -0
- spire/xls/XlsHeaderFooterShapeCollection.py +57 -0
- spire/xls/XlsHyperLink.py +229 -0
- spire/xls/XlsHyperLinksCollection.py +102 -0
- spire/xls/XlsLabelShape.py +73 -0
- spire/xls/XlsLineShape.py +367 -0
- spire/xls/XlsListBoxShape.py +124 -0
- spire/xls/XlsName.py +1871 -0
- spire/xls/XlsObject.py +36 -0
- spire/xls/XlsOvalShape.py +176 -0
- spire/xls/XlsPageSetup.py +220 -0
- spire/xls/XlsPageSetupBase.py +1354 -0
- spire/xls/XlsPicturesCollection.py +365 -0
- spire/xls/XlsPivotCache.py +401 -0
- spire/xls/XlsPivotCacheField.py +209 -0
- spire/xls/XlsPivotCachesCollection.py +124 -0
- spire/xls/XlsPivotField.py +885 -0
- spire/xls/XlsPivotTable.py +905 -0
- spire/xls/XlsPivotTablesCollection.py +131 -0
- spire/xls/XlsPrstGeomShape.py +97 -0
- spire/xls/XlsRadioButtonShape.py +188 -0
- spire/xls/XlsRange.py +3193 -0
- spire/xls/XlsRangesCollection.py +1566 -0
- spire/xls/XlsRectangleShape.py +174 -0
- spire/xls/XlsScrollBarShape.py +146 -0
- spire/xls/XlsShape.py +967 -0
- spire/xls/XlsShapeFill.py +627 -0
- spire/xls/XlsShapeLineFormat.py +341 -0
- spire/xls/XlsSpinnerShape.py +116 -0
- spire/xls/XlsStyle.py +106 -0
- spire/xls/XlsStylesCollection.py +73 -0
- spire/xls/XlsTextBoxShape.py +480 -0
- spire/xls/XlsVPageBreak.py +98 -0
- spire/xls/XlsVPageBreaksCollection.py +84 -0
- spire/xls/XlsValidation.py +520 -0
- spire/xls/XlsValidationWrapper.py +397 -0
- spire/xls/XlsWorkbook.py +1947 -0
- spire/xls/XlsWorkbookObjectsCollection.py +94 -0
- spire/xls/XlsWorksheet.py +4352 -0
- spire/xls/XlsWorksheetBase.py +1273 -0
- spire/xls/XlsWorksheetChartsCollection.py +25 -0
- spire/xls/XlsWorksheetConditionalFormats.py +215 -0
- spire/xls/XlsWorksheetsCollection.py +416 -0
- spire/xls/XmlOpenType.py +14 -0
- spire/xls/__init__.py +723 -0
- spire/xls/common/Boolean.py +192 -0
- spire/xls/common/Byte.py +256 -0
- spire/xls/common/Char.py +740 -0
- spire/xls/common/Color.py +2187 -0
- spire/xls/common/Common.py +150 -0
- spire/xls/common/CultureInfo.py +565 -0
- spire/xls/common/DateTime.py +1147 -0
- spire/xls/common/Double.py +438 -0
- spire/xls/common/EmfType.py +23 -0
- spire/xls/common/Encoding.py +928 -0
- spire/xls/common/FontStyle.py +25 -0
- spire/xls/common/GraphicsUnit.py +27 -0
- spire/xls/common/ICollection.py +70 -0
- spire/xls/common/IDictionary.py +122 -0
- spire/xls/common/IEnumerable.py +41 -0
- spire/xls/common/IEnumerator.py +60 -0
- spire/xls/common/IList.py +145 -0
- spire/xls/common/Int16.py +272 -0
- spire/xls/common/Int32.py +280 -0
- spire/xls/common/Int64.py +256 -0
- spire/xls/common/License.py +175 -0
- spire/xls/common/PixelFormat.py +43 -0
- spire/xls/common/Point.py +298 -0
- spire/xls/common/PointF.py +274 -0
- spire/xls/common/Rectangle.py +449 -0
- spire/xls/common/RectangleF.py +436 -0
- spire/xls/common/Regex.py +962 -0
- spire/xls/common/RegexOptions.py +29 -0
- spire/xls/common/Single.py +416 -0
- spire/xls/common/Size.py +271 -0
- spire/xls/common/SizeF.py +259 -0
- spire/xls/common/SpireObject.py +79 -0
- spire/xls/common/Stream.py +550 -0
- spire/xls/common/String.py +1878 -0
- spire/xls/common/TimeSpan.py +872 -0
- spire/xls/common/UInt16.py +272 -0
- spire/xls/common/UInt32.py +272 -0
- spire/xls/common/UInt64.py +272 -0
- spire/xls/common/__init__.py +316 -0
- spire/xls/lib/Spire.Xls.Base.so +0 -0
- spire/xls/lib/__init__.py +0 -0
- spire/xls/lib/libSkiaSharp.so +0 -0
- spire_xls-15.5.0.dist-info/METADATA +197 -0
- spire_xls-15.5.0.dist-info/RECORD +703 -0
- spire_xls-15.5.0.dist-info/WHEEL +5 -0
- spire_xls-15.5.0.dist-info/top_level.txt +1 -0
spire/xls/Workbook.py
ADDED
|
@@ -0,0 +1,3152 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from plum import dispatch
|
|
3
|
+
from typing import TypeVar,Union,Generic,List,Tuple
|
|
4
|
+
from spire.xls.common import *
|
|
5
|
+
from spire.xls import *
|
|
6
|
+
from ctypes import *
|
|
7
|
+
import abc
|
|
8
|
+
from spire.xls.common import dlllib
|
|
9
|
+
from spire.xls.common import dlllibXls
|
|
10
|
+
|
|
11
|
+
class Workbook (SpireObject) :
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
"""
|
|
15
|
+
@dispatch
|
|
16
|
+
def __init__(self):
|
|
17
|
+
GetDllLibXls().Workbook_CreateWorkbook.restype = c_void_p
|
|
18
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CreateWorkbook)
|
|
19
|
+
|
|
20
|
+
super(Workbook, self).__init__(intPtr)
|
|
21
|
+
#def __del__(self):
|
|
22
|
+
# GetDllLibXls().Workbook_Dispose.argtypes = [c_void_p]
|
|
23
|
+
# CallCFunction(GetDllLibXls().Workbook_Dispose, self.Ptr)
|
|
24
|
+
# super(Workbook, self).__del__()
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def ProhibitDtd(self)->bool:
|
|
28
|
+
"""
|
|
29
|
+
<summary>
|
|
30
|
+
prohibt dtd processing switch
|
|
31
|
+
</summary>
|
|
32
|
+
"""
|
|
33
|
+
GetDllLibXls().Workbook_get_ProhibitDtd.argtypes=[c_void_p]
|
|
34
|
+
GetDllLibXls().Workbook_get_ProhibitDtd.restype=c_bool
|
|
35
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_ProhibitDtd,self.Ptr)
|
|
36
|
+
return ret
|
|
37
|
+
|
|
38
|
+
@ProhibitDtd.setter
|
|
39
|
+
def ProhibitDtd(self, value:bool):
|
|
40
|
+
GetDllLibXls().Workbook_set_ProhibitDtd.argtypes=[c_void_p, c_bool]
|
|
41
|
+
CallCFunction(GetDllLibXls().Workbook_set_ProhibitDtd,self.Ptr, value)
|
|
42
|
+
|
|
43
|
+
@staticmethod
|
|
44
|
+
@dispatch
|
|
45
|
+
def SetGlobalCustomFontsFolders(fontPath:List[str]):
|
|
46
|
+
"""
|
|
47
|
+
<summary>
|
|
48
|
+
Sets the path to the folder where the global custom font is located.
|
|
49
|
+
</summary>
|
|
50
|
+
<returns></returns>
|
|
51
|
+
"""
|
|
52
|
+
countfontPath = len(fontPath)
|
|
53
|
+
ArrayTypeFontPath = c_wchar_p * countfontPath
|
|
54
|
+
arrayTypeFontPaths = ArrayTypeFontPath()
|
|
55
|
+
for i in range(0, countfontPath):
|
|
56
|
+
arrayTypeFontPaths[i] = fontPath[i]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
GetDllLibXls().Workbook_SetGlobalCustomFontsFolders.argtypes=[ArrayTypeFontPath,c_int]
|
|
60
|
+
CallCFunction(GetDllLibXls().Workbook_SetGlobalCustomFontsFolders, arrayTypeFontPaths,countfontPath)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dispatch
|
|
64
|
+
|
|
65
|
+
def SaveAsImage(self ,sheetIndex:int,dpiX:float,dpiY:float)->Stream:
|
|
66
|
+
"""
|
|
67
|
+
<summary>
|
|
68
|
+
Save workbook to image.
|
|
69
|
+
</summary>
|
|
70
|
+
<param name="sheetIndex">sheet Index</param>
|
|
71
|
+
<param name="dpiX">Dpi X</param>
|
|
72
|
+
<param name="dpiY">Dpi Y</param>
|
|
73
|
+
<returns></returns>
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
GetDllLibXls().Workbook_SaveAsImageIDD.argtypes=[c_void_p ,c_int,c_float,c_float]
|
|
77
|
+
GetDllLibXls().Workbook_SaveAsImageIDD.restype=c_void_p
|
|
78
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_SaveAsImageIDD, self.Ptr, sheetIndex,dpiX,dpiY)
|
|
79
|
+
ret = None if intPtr==None else Stream(intPtr)
|
|
80
|
+
return ret
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@dispatch
|
|
84
|
+
|
|
85
|
+
def SaveAsXml(self ,fileName:str):
|
|
86
|
+
"""
|
|
87
|
+
<summary>
|
|
88
|
+
Save workbook to an XML data file.
|
|
89
|
+
</summary>
|
|
90
|
+
<param name="fileName">XML file name.</param>
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
GetDllLibXls().Workbook_SaveAsXml.argtypes=[c_void_p ,c_void_p]
|
|
94
|
+
CallCFunction(GetDllLibXls().Workbook_SaveAsXml, self.Ptr, fileName)
|
|
95
|
+
|
|
96
|
+
@dispatch
|
|
97
|
+
|
|
98
|
+
def SaveAsXml(self ,stream:Stream):
|
|
99
|
+
"""
|
|
100
|
+
<summary>
|
|
101
|
+
Save workbook as XML format to stream.
|
|
102
|
+
</summary>
|
|
103
|
+
<param name="stream">Stream object.</param>
|
|
104
|
+
"""
|
|
105
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
106
|
+
|
|
107
|
+
GetDllLibXls().Workbook_SaveAsXmlS.argtypes=[c_void_p ,c_void_p]
|
|
108
|
+
CallCFunction(GetDllLibXls().Workbook_SaveAsXmlS, self.Ptr, intPtrstream)
|
|
109
|
+
|
|
110
|
+
# @dispatch
|
|
111
|
+
#
|
|
112
|
+
# def SaveChartAsEmfImage(self ,worksheet:Worksheet)->List[Image]:
|
|
113
|
+
# """
|
|
114
|
+
# <summary>
|
|
115
|
+
# Save chart to vector images.
|
|
116
|
+
# </summary>
|
|
117
|
+
# <param name="worksheet">worksheet instance</param>
|
|
118
|
+
# """
|
|
119
|
+
# intPtrworksheet:c_void_p = worksheet.Ptr
|
|
120
|
+
#
|
|
121
|
+
# GetDllLibXls().Workbook_SaveChartAsEmfImage.argtypes=[c_void_p ,c_void_p]
|
|
122
|
+
# GetDllLibXls().Workbook_SaveChartAsEmfImage.restype=IntPtrArray
|
|
123
|
+
# intPtrArray = CallCFunction(GetDllLibXls().Workbook_SaveChartAsEmfImage, self.Ptr, intPtrworksheet)
|
|
124
|
+
# ret = GetObjVectorFromArray(intPtrArray, Image)
|
|
125
|
+
# return ret
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
@dispatch
|
|
129
|
+
|
|
130
|
+
def SaveChartAsEmfImage(self ,worksheet:Worksheet,chartIndex:int)->Stream:
|
|
131
|
+
"""
|
|
132
|
+
<summary>
|
|
133
|
+
Save chart to vector image.
|
|
134
|
+
</summary>
|
|
135
|
+
<param name="worksheet">work sheet</param>
|
|
136
|
+
<param name="chartIndex">chart index</param>
|
|
137
|
+
"""
|
|
138
|
+
intPtrworksheet:c_void_p = worksheet.Ptr
|
|
139
|
+
|
|
140
|
+
GetDllLibXls().Workbook_SaveChartAsEmfImageWC.argtypes=[c_void_p ,c_void_p,c_int]
|
|
141
|
+
GetDllLibXls().Workbook_SaveChartAsEmfImageWC.restype=c_void_p
|
|
142
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_SaveChartAsEmfImageWC, self.Ptr, intPtrworksheet,chartIndex)
|
|
143
|
+
ret = None if intPtr==None else Stream(intPtr)
|
|
144
|
+
return ret
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
@dispatch
|
|
148
|
+
|
|
149
|
+
def SaveChartAsEmfImage(self ,worksheet:Worksheet,chartIndex:int,emfStream:Stream)->Stream:
|
|
150
|
+
"""
|
|
151
|
+
<summary>
|
|
152
|
+
Save chart to vector image.
|
|
153
|
+
</summary>
|
|
154
|
+
<param name="worksheet">work sheet</param>
|
|
155
|
+
<param name="chartIndex">chart index</param>
|
|
156
|
+
<param name="emfStream">output stream</param>
|
|
157
|
+
"""
|
|
158
|
+
intPtrworksheet:c_void_p = worksheet.Ptr
|
|
159
|
+
intPtremfStream:c_void_p = emfStream.Ptr
|
|
160
|
+
|
|
161
|
+
GetDllLibXls().Workbook_SaveChartAsEmfImageWCE.argtypes=[c_void_p ,c_void_p,c_int,c_void_p]
|
|
162
|
+
GetDllLibXls().Workbook_SaveChartAsEmfImageWCE.restype=c_void_p
|
|
163
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_SaveChartAsEmfImageWCE, self.Ptr, intPtrworksheet,chartIndex,intPtremfStream)
|
|
164
|
+
ret = None if intPtr==None else Stream(intPtr)
|
|
165
|
+
return ret
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
@dispatch
|
|
169
|
+
|
|
170
|
+
def SaveChartAsImage(self ,chartSheet:ChartSheet)->Stream:
|
|
171
|
+
"""
|
|
172
|
+
<summary>
|
|
173
|
+
Save chart to image.
|
|
174
|
+
</summary>
|
|
175
|
+
<param name="worksheet">chart sheet</param>
|
|
176
|
+
"""
|
|
177
|
+
intPtrchartSheet:c_void_p = chartSheet.Ptr
|
|
178
|
+
|
|
179
|
+
GetDllLibXls().Workbook_SaveChartAsImage.argtypes=[c_void_p ,c_void_p]
|
|
180
|
+
GetDllLibXls().Workbook_SaveChartAsImage.restype=c_void_p
|
|
181
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_SaveChartAsImage, self.Ptr, intPtrchartSheet)
|
|
182
|
+
ret = None if intPtr==None else Stream(intPtr)
|
|
183
|
+
return ret
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@dispatch
|
|
187
|
+
|
|
188
|
+
def SaveChartAsImage(self ,worksheet:Worksheet)->List[Stream]:
|
|
189
|
+
"""
|
|
190
|
+
<summary>
|
|
191
|
+
Save chart to images.
|
|
192
|
+
</summary>
|
|
193
|
+
<param name="worksheet">worksheet instance</param>
|
|
194
|
+
"""
|
|
195
|
+
intPtrworksheet:c_void_p = worksheet.Ptr
|
|
196
|
+
|
|
197
|
+
GetDllLibXls().Workbook_SaveChartAsImageW.argtypes=[c_void_p ,c_void_p]
|
|
198
|
+
GetDllLibXls().Workbook_SaveChartAsImageW.restype=IntPtrArray
|
|
199
|
+
intPtrArray = CallCFunction(GetDllLibXls().Workbook_SaveChartAsImageW, self.Ptr, intPtrworksheet)
|
|
200
|
+
ret = GetObjVectorFromArray(intPtrArray, Stream)
|
|
201
|
+
return ret
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
@dispatch
|
|
205
|
+
|
|
206
|
+
def SaveChartAsImage(self ,worksheet:Worksheet,chartIndex:int)->Stream:
|
|
207
|
+
"""
|
|
208
|
+
<summary>
|
|
209
|
+
Save chart to image.
|
|
210
|
+
</summary>
|
|
211
|
+
<param name="worksheet">work sheet</param>
|
|
212
|
+
<param name="chartIndex">chart index</param>
|
|
213
|
+
"""
|
|
214
|
+
intPtrworksheet:c_void_p = worksheet.Ptr
|
|
215
|
+
|
|
216
|
+
GetDllLibXls().Workbook_SaveChartAsImageWC.argtypes=[c_void_p ,c_void_p,c_int]
|
|
217
|
+
GetDllLibXls().Workbook_SaveChartAsImageWC.restype=c_void_p
|
|
218
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_SaveChartAsImageWC, self.Ptr, intPtrworksheet,chartIndex)
|
|
219
|
+
ret = None if intPtr==None else Stream(intPtr)
|
|
220
|
+
return ret
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
@dispatch
|
|
224
|
+
|
|
225
|
+
def SaveAsTemplate(self ,fileName:str):
|
|
226
|
+
"""
|
|
227
|
+
<summary>
|
|
228
|
+
Save workbook as template to file.
|
|
229
|
+
</summary>
|
|
230
|
+
<param name="fileName">File name.</param>
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
GetDllLibXls().Workbook_SaveAsTemplate.argtypes=[c_void_p ,c_void_p]
|
|
234
|
+
CallCFunction(GetDllLibXls().Workbook_SaveAsTemplate, self.Ptr, fileName)
|
|
235
|
+
|
|
236
|
+
# @dispatch
|
|
237
|
+
#
|
|
238
|
+
# def SaveAsTemplate(self ,fileName:str,response:'HttpResponse'):
|
|
239
|
+
# """
|
|
240
|
+
# <summary>
|
|
241
|
+
# Save workbook as template to response.
|
|
242
|
+
# </summary>
|
|
243
|
+
# <param name="fileName">File name.</param>
|
|
244
|
+
# <param name="response">Http response.</param>
|
|
245
|
+
# """
|
|
246
|
+
# intPtrresponse:c_void_p = response.Ptr
|
|
247
|
+
#
|
|
248
|
+
# GetDllLibXls().Workbook_SaveAsTemplateFR.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
249
|
+
# CallCFunction(GetDllLibXls().Workbook_SaveAsTemplateFR, self.Ptr, fileName,intPtrresponse)
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
# @dispatch
|
|
253
|
+
#
|
|
254
|
+
# def SaveToHttpResponse(self ,FileName:str,response:'HttpResponse'):
|
|
255
|
+
# """
|
|
256
|
+
# <summary>
|
|
257
|
+
# Save workbook to the http response.
|
|
258
|
+
# </summary>
|
|
259
|
+
# <param name="FileName">File Name</param>
|
|
260
|
+
# <param name="response">Http response</param>
|
|
261
|
+
# <param name="saveType">Save type : attachment or inline mode</param>
|
|
262
|
+
# """
|
|
263
|
+
# intPtrresponse:c_void_p = response.Ptr
|
|
264
|
+
#
|
|
265
|
+
# GetDllLibXls().Workbook_SaveToHttpResponse.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
266
|
+
# CallCFunction(GetDllLibXls().Workbook_SaveToHttpResponse, self.Ptr, FileName,intPtrresponse)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
# @dispatch
|
|
270
|
+
#
|
|
271
|
+
# def SaveToHttpResponse(self ,FileName:str,response:'HttpResponse',isInlineMode:bool):
|
|
272
|
+
# """
|
|
273
|
+
# <summary>
|
|
274
|
+
# Save workbook to the http response.
|
|
275
|
+
# </summary>
|
|
276
|
+
# <param name="FileName">File name</param>
|
|
277
|
+
# <param name="response">Http response.</param>
|
|
278
|
+
# <param name="isInlineMode">True - inline mode, False - Attachment mode.</param>
|
|
279
|
+
# """
|
|
280
|
+
# intPtrresponse:c_void_p = response.Ptr
|
|
281
|
+
#
|
|
282
|
+
# GetDllLibXls().Workbook_SaveToHttpResponseFRI.argtypes=[c_void_p ,c_void_p,c_void_p,c_bool]
|
|
283
|
+
# CallCFunction(GetDllLibXls().Workbook_SaveToHttpResponseFRI, self.Ptr, FileName,intPtrresponse,isInlineMode)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# @dispatch
|
|
287
|
+
#
|
|
288
|
+
# def SaveToHttpResponse(self ,FileName:str,response:'HttpResponse',httpContextType:HttpContentType):
|
|
289
|
+
# """
|
|
290
|
+
# <summary>
|
|
291
|
+
# Save workbook to the http response.
|
|
292
|
+
# </summary>
|
|
293
|
+
# <param name="FileName">File Name</param>
|
|
294
|
+
# <param name="response">Http response</param>
|
|
295
|
+
# <param name="httpContextType">Http context type</param>
|
|
296
|
+
# """
|
|
297
|
+
# intPtrresponse:c_void_p = response.Ptr
|
|
298
|
+
# enumhttpContextType:c_int = httpContextType.value
|
|
299
|
+
#
|
|
300
|
+
# GetDllLibXls().Workbook_SaveToHttpResponseFRH.argtypes=[c_void_p ,c_void_p,c_void_p,c_int]
|
|
301
|
+
# CallCFunction(GetDllLibXls().Workbook_SaveToHttpResponseFRH, self.Ptr, FileName,intPtrresponse,enumhttpContextType)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
# @dispatch
|
|
305
|
+
#
|
|
306
|
+
# def SaveToHttpResponse(self ,FileName:str,response:'HttpResponse',httpContextType:HttpContentType,fileFormat:FileFormat):
|
|
307
|
+
# """
|
|
308
|
+
# <summary>
|
|
309
|
+
# Save workbook to the http response.
|
|
310
|
+
# </summary>
|
|
311
|
+
# <param name="FileName">File Name</param>
|
|
312
|
+
# <param name="response">Http response</param>
|
|
313
|
+
# <param name="httpContextType">Http context type</param>
|
|
314
|
+
# """
|
|
315
|
+
# intPtrresponse:c_void_p = response.Ptr
|
|
316
|
+
# enumhttpContextType:c_int = httpContextType.value
|
|
317
|
+
# enumfileFormat:c_int = fileFormat.value
|
|
318
|
+
#
|
|
319
|
+
# GetDllLibXls().Workbook_SaveToHttpResponseFRHF.argtypes=[c_void_p ,c_void_p,c_void_p,c_int,c_int]
|
|
320
|
+
# CallCFunction(GetDllLibXls().Workbook_SaveToHttpResponseFRHF, self.Ptr, FileName,intPtrresponse,enumhttpContextType,enumfileFormat)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
@dispatch
|
|
324
|
+
|
|
325
|
+
def SaveToStream(self ,Stream:Stream):
|
|
326
|
+
"""
|
|
327
|
+
<summary>
|
|
328
|
+
Save workbook the stream
|
|
329
|
+
</summary>
|
|
330
|
+
<param name="Stream">Stream object</param>
|
|
331
|
+
"""
|
|
332
|
+
intPtrStream:c_void_p = Stream.Ptr
|
|
333
|
+
|
|
334
|
+
GetDllLibXls().Workbook_SaveToStream.argtypes=[c_void_p ,c_void_p]
|
|
335
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToStream, self.Ptr, intPtrStream)
|
|
336
|
+
|
|
337
|
+
@dispatch
|
|
338
|
+
|
|
339
|
+
def SaveToStream(self ,Stream:Stream,fileFormat:FileFormat):
|
|
340
|
+
"""
|
|
341
|
+
<summary>
|
|
342
|
+
Save workbook to stream.
|
|
343
|
+
</summary>
|
|
344
|
+
<param name="Stream"></param>
|
|
345
|
+
<param name="fileFormat"></param>
|
|
346
|
+
"""
|
|
347
|
+
intPtrStream:c_void_p = Stream.Ptr
|
|
348
|
+
enumfileFormat:c_int = fileFormat.value
|
|
349
|
+
|
|
350
|
+
GetDllLibXls().Workbook_SaveToStreamByFileFormat.argtypes=[c_void_p ,c_void_p,c_int]
|
|
351
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToStreamByFileFormat, self.Ptr, intPtrStream,enumfileFormat)
|
|
352
|
+
|
|
353
|
+
@dispatch
|
|
354
|
+
|
|
355
|
+
def SaveToStream(self ,stream:Stream,separator:str):
|
|
356
|
+
"""
|
|
357
|
+
<summary>
|
|
358
|
+
Save workbook the stream.
|
|
359
|
+
<example>The following code illustrates how to saves the active worksheet as stream with separator:
|
|
360
|
+
<code>
|
|
361
|
+
//Create workbook
|
|
362
|
+
Workbook workbook = new Workbook();
|
|
363
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
364
|
+
//Save to stream
|
|
365
|
+
Stream stream = new MemoryStream();
|
|
366
|
+
workbook.SaveToFile(stream , ",");
|
|
367
|
+
</code>
|
|
368
|
+
</example>
|
|
369
|
+
</summary>
|
|
370
|
+
<param name="stream">Stream object.</param>
|
|
371
|
+
<param name="separator">Separator.</param>
|
|
372
|
+
"""
|
|
373
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
374
|
+
|
|
375
|
+
GetDllLibXls().Workbook_SaveToStreamBySeparator.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
376
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToStreamBySeparator, self.Ptr, intPtrstream,separator)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def SetMaxDigitWidth(self ,w:int):
|
|
380
|
+
"""
|
|
381
|
+
|
|
382
|
+
"""
|
|
383
|
+
|
|
384
|
+
GetDllLibXls().Workbook_SetMaxDigitWidth.argtypes=[c_void_p ,c_int]
|
|
385
|
+
CallCFunction(GetDllLibXls().Workbook_SetMaxDigitWidth, self.Ptr, w)
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
def SetOleSize(self ,firstRow:int,firstColumn:int,lastRow:int,lastColumn:int):
|
|
389
|
+
"""
|
|
390
|
+
<summary>
|
|
391
|
+
set the size of the visible range of cells when this workbook is displyed as an embedded obect in another document;
|
|
392
|
+
</summary>
|
|
393
|
+
<param name="firstRow">the visible range's first row index</param>
|
|
394
|
+
<param name="firstColumn">the visible range's first column index</param>
|
|
395
|
+
<param name="lastRow">the visible range's last row index</param>
|
|
396
|
+
<param name="lastColumn">the visible range's last column index</param>
|
|
397
|
+
"""
|
|
398
|
+
|
|
399
|
+
GetDllLibXls().Workbook_SetOleSize.argtypes=[c_void_p ,c_int,c_int,c_int,c_int]
|
|
400
|
+
CallCFunction(GetDllLibXls().Workbook_SetOleSize, self.Ptr, firstRow,firstColumn,lastRow,lastColumn)
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
def SetWriteProtectionPassword(self ,password:str):
|
|
404
|
+
"""
|
|
405
|
+
<summary>
|
|
406
|
+
Sets write protection password.
|
|
407
|
+
</summary>
|
|
408
|
+
<param name="password">Password to set</param>
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
GetDllLibXls().Workbook_SetWriteProtectionPassword.argtypes=[c_void_p ,c_void_p]
|
|
412
|
+
CallCFunction(GetDllLibXls().Workbook_SetWriteProtectionPassword, self.Ptr, password)
|
|
413
|
+
|
|
414
|
+
@dispatch
|
|
415
|
+
def UnProtect(self):
|
|
416
|
+
"""
|
|
417
|
+
<summary>
|
|
418
|
+
unprotect file
|
|
419
|
+
also upprotect workbook window and structure
|
|
420
|
+
</summary>
|
|
421
|
+
"""
|
|
422
|
+
GetDllLibXls().Workbook_UnProtect.argtypes=[c_void_p]
|
|
423
|
+
CallCFunction(GetDllLibXls().Workbook_UnProtect, self.Ptr)
|
|
424
|
+
|
|
425
|
+
@dispatch
|
|
426
|
+
|
|
427
|
+
def UnProtect(self ,bookWindowAndStructurePassword:str):
|
|
428
|
+
"""
|
|
429
|
+
<summary>
|
|
430
|
+
unprotect file
|
|
431
|
+
also upprotect workbook window and structure
|
|
432
|
+
</summary>
|
|
433
|
+
<param name="bookWindowAndStructurePassword">password for protect workbook window and structure</param>
|
|
434
|
+
"""
|
|
435
|
+
|
|
436
|
+
GetDllLibXls().Workbook_UnProtectB.argtypes=[c_void_p ,c_void_p]
|
|
437
|
+
CallCFunction(GetDllLibXls().Workbook_UnProtectB, self.Ptr, bookWindowAndStructurePassword)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
def UnProtectWorkbook(self ,password:str):
|
|
441
|
+
"""
|
|
442
|
+
<summary>
|
|
443
|
+
unprotect workbook window and structure
|
|
444
|
+
</summary>
|
|
445
|
+
<param name="password">password</param>
|
|
446
|
+
"""
|
|
447
|
+
|
|
448
|
+
GetDllLibXls().Workbook_UnProtectWorkbook.argtypes=[c_void_p ,c_void_p]
|
|
449
|
+
CallCFunction(GetDllLibXls().Workbook_UnProtectWorkbook, self.Ptr, password)
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
def GetChartSheetByName(self ,name:str)->'ChartSheet':
|
|
453
|
+
"""
|
|
454
|
+
|
|
455
|
+
"""
|
|
456
|
+
|
|
457
|
+
GetDllLibXls().Workbook_GetChartSheetByName.argtypes=[c_void_p ,c_void_p]
|
|
458
|
+
GetDllLibXls().Workbook_GetChartSheetByName.restype=c_void_p
|
|
459
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_GetChartSheetByName, self.Ptr, name)
|
|
460
|
+
ret = None if intPtr==None else ChartSheet(intPtr)
|
|
461
|
+
return ret
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
def GetOleSize(self)->'IXLSRange':
|
|
466
|
+
"""
|
|
467
|
+
<summary>
|
|
468
|
+
get the size of the visible range of cells when this workbook is displyed as an embedded obect in another document;
|
|
469
|
+
</summary>
|
|
470
|
+
<returns>if there does not set the size ,return null</returns>
|
|
471
|
+
"""
|
|
472
|
+
GetDllLibXls().Workbook_GetOleSize.argtypes=[c_void_p]
|
|
473
|
+
GetDllLibXls().Workbook_GetOleSize.restype=c_void_p
|
|
474
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_GetOleSize, self.Ptr)
|
|
475
|
+
ret = None if intPtr==None else XlsRange(intPtr)
|
|
476
|
+
return ret
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
@property
|
|
480
|
+
def HasTrackedChanges(self)->bool:
|
|
481
|
+
"""
|
|
482
|
+
<summary>
|
|
483
|
+
Indicates whether the workbook has any tracked changes
|
|
484
|
+
</summary>
|
|
485
|
+
"""
|
|
486
|
+
GetDllLibXls().Workbook_get_HasTrackedChanges.argtypes=[c_void_p]
|
|
487
|
+
GetDllLibXls().Workbook_get_HasTrackedChanges.restype=c_bool
|
|
488
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_HasTrackedChanges, self.Ptr)
|
|
489
|
+
return ret
|
|
490
|
+
|
|
491
|
+
def RejectAllTrackedChanges(self):
|
|
492
|
+
"""
|
|
493
|
+
<summary>
|
|
494
|
+
Reject all tracked changes in the workbook.
|
|
495
|
+
</summary>
|
|
496
|
+
"""
|
|
497
|
+
GetDllLibXls().Workbook_RejectAllTrackedChanges.argtypes=[c_void_p]
|
|
498
|
+
CallCFunction(GetDllLibXls().Workbook_RejectAllTrackedChanges, self.Ptr)
|
|
499
|
+
|
|
500
|
+
def AcceptAllTrackedChanges(self):
|
|
501
|
+
"""
|
|
502
|
+
<summary>
|
|
503
|
+
Accept all tracked changes in the workbook.
|
|
504
|
+
</summary>
|
|
505
|
+
"""
|
|
506
|
+
GetDllLibXls().Workbook_AcceptAllTrackedChanges.argtypes=[c_void_p]
|
|
507
|
+
CallCFunction(GetDllLibXls().Workbook_AcceptAllTrackedChanges, self.Ptr)
|
|
508
|
+
|
|
509
|
+
def TrackedChanges(self,switchValue:bool):
|
|
510
|
+
"""
|
|
511
|
+
<summary>
|
|
512
|
+
Turn revision mode on or off.
|
|
513
|
+
</summary>
|
|
514
|
+
"""
|
|
515
|
+
GetDllLibXls().Workbook_TrackedChanges.argtypes=[c_void_p,c_bool]
|
|
516
|
+
CallCFunction(GetDllLibXls().Workbook_TrackedChanges, self.Ptr,switchValue)
|
|
517
|
+
|
|
518
|
+
#
|
|
519
|
+
# def AddDigitalSignature(self ,certificate:'X509Certificate2',comments:str,signTime:'DateTime')->'IDigitalSignatures':
|
|
520
|
+
# """
|
|
521
|
+
# <summary>
|
|
522
|
+
# Add a DigitalSignature.
|
|
523
|
+
# </summary>
|
|
524
|
+
# <param name="certificate">Certificate object that was used to sign</param>
|
|
525
|
+
# <param name="comments">Signature Comments</param>
|
|
526
|
+
# <param name="signTime">Sign Time</param>
|
|
527
|
+
# <returns>Collection of DigitalSignature</returns>
|
|
528
|
+
# """
|
|
529
|
+
# intPtrcertificate:c_void_p = certificate.Ptr
|
|
530
|
+
# intPtrsignTime:c_void_p = signTime.Ptr
|
|
531
|
+
#
|
|
532
|
+
# GetDllLibXls().Workbook_AddDigitalSignature.argtypes=[c_void_p ,c_void_p,c_void_p,c_void_p]
|
|
533
|
+
# GetDllLibXls().Workbook_AddDigitalSignature.restype=c_void_p
|
|
534
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_AddDigitalSignature, self.Ptr, intPtrcertificate,comments,intPtrsignTime)
|
|
535
|
+
# ret = None if intPtr==None else IDigitalSignatures(intPtr)
|
|
536
|
+
# return ret
|
|
537
|
+
#
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
def GetDigitalSignatures(self)->'IDigitalSignatures':
|
|
542
|
+
"""
|
|
543
|
+
<summary>
|
|
544
|
+
Get collection of DigitalSignature in this file.
|
|
545
|
+
</summary>
|
|
546
|
+
<returns>Collection of DigitalSignature</returns>
|
|
547
|
+
"""
|
|
548
|
+
GetDllLibXls().Workbook_GetDigitalSignatures.argtypes=[c_void_p]
|
|
549
|
+
GetDllLibXls().Workbook_GetDigitalSignatures.restype=c_void_p
|
|
550
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_GetDigitalSignatures, self.Ptr)
|
|
551
|
+
ret = None if intPtr==None else IDigitalSignatures(intPtr)
|
|
552
|
+
return ret
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
def RemoveAllDigitalSignatures(self):
|
|
556
|
+
"""
|
|
557
|
+
<summary>
|
|
558
|
+
Remove all DigitalSignature in this file.
|
|
559
|
+
</summary>
|
|
560
|
+
"""
|
|
561
|
+
GetDllLibXls().Workbook_RemoveAllDigitalSignatures.argtypes=[c_void_p]
|
|
562
|
+
CallCFunction(GetDllLibXls().Workbook_RemoveAllDigitalSignatures, self.Ptr)
|
|
563
|
+
|
|
564
|
+
@property
|
|
565
|
+
def IsDigitallySigned(self)->bool:
|
|
566
|
+
"""
|
|
567
|
+
<summary>
|
|
568
|
+
Indicates whether this spreadsheet is digitally signed.
|
|
569
|
+
</summary>
|
|
570
|
+
"""
|
|
571
|
+
GetDllLibXls().Workbook_get_IsDigitallySigned.argtypes=[c_void_p]
|
|
572
|
+
GetDllLibXls().Workbook_get_IsDigitallySigned.restype=c_bool
|
|
573
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsDigitallySigned, self.Ptr)
|
|
574
|
+
return ret
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
def GetThemeColor(self ,type:'ThemeColorType')->'Color':
|
|
578
|
+
"""
|
|
579
|
+
<summary>
|
|
580
|
+
Gets theme color.
|
|
581
|
+
</summary>
|
|
582
|
+
<param name="type">The theme color type.</param>
|
|
583
|
+
<returns>The theme color.</returns>
|
|
584
|
+
"""
|
|
585
|
+
enumtype:c_int = type.value
|
|
586
|
+
|
|
587
|
+
GetDllLibXls().Workbook_GetThemeColor.argtypes=[c_void_p ,c_int]
|
|
588
|
+
GetDllLibXls().Workbook_GetThemeColor.restype=c_void_p
|
|
589
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_GetThemeColor, self.Ptr, enumtype)
|
|
590
|
+
ret = None if intPtr==None else Color(intPtr)
|
|
591
|
+
return ret
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
def SetThemeColor(self ,type:'ThemeColorType',color:'Color'):
|
|
596
|
+
"""
|
|
597
|
+
<summary>
|
|
598
|
+
Sets the theme color
|
|
599
|
+
</summary>
|
|
600
|
+
<param name="type">The theme color type.</param>
|
|
601
|
+
<param name="color">the theme color</param>
|
|
602
|
+
"""
|
|
603
|
+
enumtype:c_int = type.value
|
|
604
|
+
intPtrcolor:c_void_p = color.Ptr
|
|
605
|
+
|
|
606
|
+
GetDllLibXls().Workbook_SetThemeColor.argtypes=[c_void_p ,c_int,c_void_p]
|
|
607
|
+
CallCFunction(GetDllLibXls().Workbook_SetThemeColor, self.Ptr, enumtype,intPtrcolor)
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
def CopyTheme(self ,srcWorkbook:'Workbook'):
|
|
611
|
+
"""
|
|
612
|
+
<summary>
|
|
613
|
+
Copy the theme from source workbook
|
|
614
|
+
</summary>
|
|
615
|
+
<param name="srcWorkbook">source workbook.</param>
|
|
616
|
+
"""
|
|
617
|
+
intPtrsrcWorkbook:c_void_p = srcWorkbook.Ptr
|
|
618
|
+
|
|
619
|
+
GetDllLibXls().Workbook_CopyTheme.argtypes=[c_void_p ,c_void_p]
|
|
620
|
+
CallCFunction(GetDllLibXls().Workbook_CopyTheme, self.Ptr, intPtrsrcWorkbook)
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
def CopyThemeColor(self ,srcWorkbook:'Workbook'):
|
|
624
|
+
"""
|
|
625
|
+
<summary>
|
|
626
|
+
Copy the theme color from source workbook
|
|
627
|
+
</summary>
|
|
628
|
+
<param name="srcWorkbook">source workbook.</param>
|
|
629
|
+
"""
|
|
630
|
+
intPtrsrcWorkbook:c_void_p = srcWorkbook.Ptr
|
|
631
|
+
|
|
632
|
+
GetDllLibXls().Workbook_CopyThemeColor.argtypes=[c_void_p ,c_void_p]
|
|
633
|
+
CallCFunction(GetDllLibXls().Workbook_CopyThemeColor, self.Ptr, intPtrsrcWorkbook)
|
|
634
|
+
|
|
635
|
+
@dispatch
|
|
636
|
+
|
|
637
|
+
def LoadFromFile(self ,fileName:str):
|
|
638
|
+
"""
|
|
639
|
+
<summary>
|
|
640
|
+
Loads a file and imports its data.
|
|
641
|
+
</summary>
|
|
642
|
+
<param name="FileName">File name.</param>
|
|
643
|
+
"""
|
|
644
|
+
|
|
645
|
+
GetDllLibXls().Workbook_LoadFromFile.argtypes=[c_void_p ,c_void_p]
|
|
646
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFile, self.Ptr, fileName)
|
|
647
|
+
|
|
648
|
+
@dispatch
|
|
649
|
+
|
|
650
|
+
def LoadFromFile(self ,fileName:str,preserveMode:bool):
|
|
651
|
+
"""
|
|
652
|
+
<summary>
|
|
653
|
+
Loads a file and imports its data.
|
|
654
|
+
</summary>
|
|
655
|
+
<param name="fileName">File name</param>
|
|
656
|
+
<param name="preserveMode">Preserve mode</param>
|
|
657
|
+
"""
|
|
658
|
+
|
|
659
|
+
GetDllLibXls().Workbook_LoadFromFileByMode.argtypes=[c_void_p ,c_void_p,c_bool]
|
|
660
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFileByMode, self.Ptr, fileName,preserveMode)
|
|
661
|
+
|
|
662
|
+
@dispatch
|
|
663
|
+
|
|
664
|
+
def LoadFromFile(self ,fileName:str,version:ExcelVersion):
|
|
665
|
+
"""
|
|
666
|
+
<summary>
|
|
667
|
+
Loads a file and imports its data.
|
|
668
|
+
</summary>
|
|
669
|
+
<param name="fileName">File name</param>
|
|
670
|
+
<param name="version">Excel version</param>
|
|
671
|
+
"""
|
|
672
|
+
enumversion:c_int = version.value
|
|
673
|
+
|
|
674
|
+
GetDllLibXls().Workbook_LoadFromFileByVersion.argtypes=[c_void_p ,c_void_p,c_int]
|
|
675
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFileByVersion, self.Ptr, fileName,enumversion)
|
|
676
|
+
|
|
677
|
+
@dispatch
|
|
678
|
+
|
|
679
|
+
def LoadFromFile(self ,fileName:str,separator:str):
|
|
680
|
+
"""
|
|
681
|
+
<summary>
|
|
682
|
+
Loads text files stream with user defined separator.
|
|
683
|
+
</summary>
|
|
684
|
+
<param name="fileName">File name</param>
|
|
685
|
+
<param name="separator">Delimiter of text file. </param>
|
|
686
|
+
"""
|
|
687
|
+
|
|
688
|
+
GetDllLibXls().Workbook_LoadFromFileBySeparator.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
689
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFileBySeparator, self.Ptr, fileName,separator)
|
|
690
|
+
|
|
691
|
+
@dispatch
|
|
692
|
+
|
|
693
|
+
def LoadFromFile(self ,fileName:str,separator:str,row:int,column:int):
|
|
694
|
+
"""
|
|
695
|
+
<summary>
|
|
696
|
+
Loads text files with user defined separator.
|
|
697
|
+
</summary>
|
|
698
|
+
<param name="fileName">File name.</param>
|
|
699
|
+
<param name="separator">Delimiter of text file.</param>
|
|
700
|
+
<param name="row">Start row.</param>
|
|
701
|
+
<param name="column">Start column.</param>
|
|
702
|
+
"""
|
|
703
|
+
|
|
704
|
+
GetDllLibXls().Workbook_LoadFromFileBySRC.argtypes=[c_void_p ,c_void_p,c_void_p,c_int,c_int]
|
|
705
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFileBySRC, self.Ptr, fileName,separator,row,column)
|
|
706
|
+
|
|
707
|
+
@dispatch
|
|
708
|
+
|
|
709
|
+
def LoadFromFile(self ,fileName:str,separator:str,row:int,column:int,version:ExcelVersion):
|
|
710
|
+
"""
|
|
711
|
+
<summary>
|
|
712
|
+
Loads text files with user defined separator.
|
|
713
|
+
</summary>
|
|
714
|
+
<param name="fileName">File name.</param>
|
|
715
|
+
<param name="separator">Delimiter of text file.</param>
|
|
716
|
+
<param name="row">Start row.</param>
|
|
717
|
+
<param name="column">Start column.</param>
|
|
718
|
+
<param name="version">workbook version</param>
|
|
719
|
+
"""
|
|
720
|
+
enumversion:c_int = version.value
|
|
721
|
+
|
|
722
|
+
GetDllLibXls().Workbook_LoadFromFileBySRCV.argtypes=[c_void_p ,c_void_p,c_void_p,c_int,c_int,c_int]
|
|
723
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFileBySRCV, self.Ptr, fileName,separator,row,column,enumversion)
|
|
724
|
+
|
|
725
|
+
@dispatch
|
|
726
|
+
|
|
727
|
+
def LoadFromFile(self ,fileName:str,separator:str,row:int,column:int,version:ExcelVersion,encoding:Encoding):
|
|
728
|
+
"""
|
|
729
|
+
<summary>
|
|
730
|
+
Loads text files with user defined separator.
|
|
731
|
+
</summary>
|
|
732
|
+
<param name="fileName">File name.</param>
|
|
733
|
+
<param name="separator">Delimiter of text file.</param>
|
|
734
|
+
<param name="row">Start row.</param>
|
|
735
|
+
<param name="column">Start column.</param>
|
|
736
|
+
<param name="version">workbook version</param>
|
|
737
|
+
<param name="encoding">Text Encoding</param>
|
|
738
|
+
"""
|
|
739
|
+
enumversion:c_int = version.value
|
|
740
|
+
intPtrencoding:c_void_p = encoding.Ptr
|
|
741
|
+
|
|
742
|
+
GetDllLibXls().Workbook_LoadFromFileSRCVE.argtypes=[c_void_p ,c_void_p,c_void_p,c_int,c_int,c_int,c_void_p]
|
|
743
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromFileSRCVE, self.Ptr, fileName,separator,row,column,enumversion,intPtrencoding)
|
|
744
|
+
|
|
745
|
+
@dispatch
|
|
746
|
+
|
|
747
|
+
def LoadFromStream(self ,stream:Stream):
|
|
748
|
+
"""
|
|
749
|
+
<summary>
|
|
750
|
+
Load workbook from the stream.
|
|
751
|
+
</summary>
|
|
752
|
+
<param name="stream">Stream contains data.</param>
|
|
753
|
+
"""
|
|
754
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
755
|
+
|
|
756
|
+
GetDllLibXls().Workbook_LoadFromStream.argtypes=[c_void_p ,c_void_p]
|
|
757
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromStream, self.Ptr, intPtrstream)
|
|
758
|
+
|
|
759
|
+
@dispatch
|
|
760
|
+
|
|
761
|
+
def LoadFromStream(self ,stream:Stream,loadStyles:bool):
|
|
762
|
+
"""
|
|
763
|
+
<summary>
|
|
764
|
+
Load workbook from the stream.
|
|
765
|
+
</summary>
|
|
766
|
+
<param name="stream">Stream contains data.</param>
|
|
767
|
+
<param name="loadStyles">Indicates whether loads styles.</param>
|
|
768
|
+
"""
|
|
769
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
770
|
+
|
|
771
|
+
GetDllLibXls().Workbook_LoadFromStreamByL.argtypes=[c_void_p ,c_void_p,c_bool]
|
|
772
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromStreamByL, self.Ptr, intPtrstream,loadStyles)
|
|
773
|
+
|
|
774
|
+
@dispatch
|
|
775
|
+
|
|
776
|
+
def LoadFromStream(self ,stream:Stream,version:ExcelVersion):
|
|
777
|
+
"""
|
|
778
|
+
<summary>
|
|
779
|
+
Load workbook from the stream.
|
|
780
|
+
</summary>
|
|
781
|
+
<param name="stream">Stream contains data</param>
|
|
782
|
+
<param name="version">Excel version</param>
|
|
783
|
+
"""
|
|
784
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
785
|
+
enumversion:c_int = version.value
|
|
786
|
+
|
|
787
|
+
GetDllLibXls().Workbook_LoadFromStreamV.argtypes=[c_void_p ,c_void_p,c_int]
|
|
788
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromStreamV, self.Ptr, intPtrstream,enumversion)
|
|
789
|
+
|
|
790
|
+
@dispatch
|
|
791
|
+
|
|
792
|
+
def LoadFromStream(self ,stream:Stream,separator:str,row:int,column:int):
|
|
793
|
+
"""
|
|
794
|
+
<summary>
|
|
795
|
+
Loads text files stream with user defined separator.max row 60000.
|
|
796
|
+
</summary>
|
|
797
|
+
<param name="stream">File stream.</param>
|
|
798
|
+
<param name="separator">Delimiter of text file.</param>
|
|
799
|
+
<param name="row">Start row.</param>
|
|
800
|
+
<param name="column">Start column.</param>
|
|
801
|
+
"""
|
|
802
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
803
|
+
|
|
804
|
+
GetDllLibXls().Workbook_LoadFromStreamSRC.argtypes=[c_void_p ,c_void_p,c_void_p,c_int,c_int]
|
|
805
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromStreamSRC, self.Ptr, intPtrstream,separator,row,column)
|
|
806
|
+
|
|
807
|
+
@dispatch
|
|
808
|
+
|
|
809
|
+
def LoadFromStream(self ,stream:Stream,separator:str,row:int,column:int,version:ExcelVersion):
|
|
810
|
+
"""
|
|
811
|
+
<summary>
|
|
812
|
+
Loads text files stream with user defined separator. Version2007 support 60000+ row
|
|
813
|
+
</summary>
|
|
814
|
+
<param name="stream">File stream.</param>
|
|
815
|
+
<param name="separator">Delimiter of text file.</param>
|
|
816
|
+
<param name="row">Start row.</param>
|
|
817
|
+
<param name="column">Start column.</param>
|
|
818
|
+
<param name="version">Excel version.</param>
|
|
819
|
+
"""
|
|
820
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
821
|
+
enumversion:c_int = version.value
|
|
822
|
+
|
|
823
|
+
GetDllLibXls().Workbook_LoadFromStreamSRCV.argtypes=[c_void_p ,c_void_p,c_void_p,c_int,c_int,c_int]
|
|
824
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromStreamSRCV, self.Ptr, intPtrstream,separator,row,column,enumversion)
|
|
825
|
+
|
|
826
|
+
@dispatch
|
|
827
|
+
|
|
828
|
+
def LoadFromXml(self ,fileName:str):
|
|
829
|
+
"""
|
|
830
|
+
<summary>
|
|
831
|
+
Loads a xml file and imports its data.
|
|
832
|
+
</summary>
|
|
833
|
+
<param name="fileName">File name.</param>
|
|
834
|
+
"""
|
|
835
|
+
|
|
836
|
+
GetDllLibXls().Workbook_LoadFromXml.argtypes=[c_void_p ,c_void_p]
|
|
837
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromXml, self.Ptr, fileName)
|
|
838
|
+
|
|
839
|
+
@dispatch
|
|
840
|
+
|
|
841
|
+
def LoadFromXml(self ,stream:Stream):
|
|
842
|
+
"""
|
|
843
|
+
<summary>
|
|
844
|
+
Loads a xml file and imports its data.
|
|
845
|
+
</summary>
|
|
846
|
+
<param name="stream">Stream contains data.</param>
|
|
847
|
+
"""
|
|
848
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
849
|
+
|
|
850
|
+
GetDllLibXls().Workbook_LoadFromXmlStream.argtypes=[c_void_p ,c_void_p]
|
|
851
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromXmlStream, self.Ptr, intPtrstream)
|
|
852
|
+
|
|
853
|
+
@dispatch
|
|
854
|
+
|
|
855
|
+
def LoadFromHtml(self ,fileName:str):
|
|
856
|
+
"""
|
|
857
|
+
<summary>
|
|
858
|
+
Loads a html file and imports its data.
|
|
859
|
+
</summary>
|
|
860
|
+
<param name="fileName">File name.</param>
|
|
861
|
+
"""
|
|
862
|
+
|
|
863
|
+
GetDllLibXls().Workbook_LoadFromHtml.argtypes=[c_void_p ,c_void_p]
|
|
864
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromHtml, self.Ptr, fileName)
|
|
865
|
+
|
|
866
|
+
@dispatch
|
|
867
|
+
|
|
868
|
+
def LoadFromHtml(self ,stream:Stream):
|
|
869
|
+
"""
|
|
870
|
+
<summary>
|
|
871
|
+
Loads a html file and imports its data.
|
|
872
|
+
</summary>
|
|
873
|
+
<param name="stream">Stream contains data.</param>
|
|
874
|
+
"""
|
|
875
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
876
|
+
|
|
877
|
+
GetDllLibXls().Workbook_LoadFromHtmlStream.argtypes=[c_void_p ,c_void_p]
|
|
878
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromHtmlStream, self.Ptr, intPtrstream)
|
|
879
|
+
|
|
880
|
+
@dispatch
|
|
881
|
+
|
|
882
|
+
def LoadFromMHtml(self ,fileName:str):
|
|
883
|
+
"""
|
|
884
|
+
<summary>
|
|
885
|
+
Loads a Mhtml file and imports its data.
|
|
886
|
+
</summary>
|
|
887
|
+
<param name="fileName">File name.</param>
|
|
888
|
+
"""
|
|
889
|
+
|
|
890
|
+
GetDllLibXls().Workbook_LoadFromMHtml.argtypes=[c_void_p ,c_void_p]
|
|
891
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromMHtml, self.Ptr, fileName)
|
|
892
|
+
|
|
893
|
+
@dispatch
|
|
894
|
+
|
|
895
|
+
def LoadFromMHtml(self ,stream:Stream):
|
|
896
|
+
"""
|
|
897
|
+
<summary>
|
|
898
|
+
Loads a Mhtml file and imports its data.
|
|
899
|
+
</summary>
|
|
900
|
+
<param name="stream">Stream contains data.</param>
|
|
901
|
+
"""
|
|
902
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
903
|
+
|
|
904
|
+
GetDllLibXls().Workbook_LoadFromMHtmlStream.argtypes=[c_void_p ,c_void_p]
|
|
905
|
+
CallCFunction(GetDllLibXls().Workbook_LoadFromMHtmlStream, self.Ptr, intPtrstream)
|
|
906
|
+
|
|
907
|
+
@dispatch
|
|
908
|
+
|
|
909
|
+
def LoadTemplateFromFile(self ,fileName:str):
|
|
910
|
+
"""
|
|
911
|
+
<summary>
|
|
912
|
+
Load workbook from the excel template.
|
|
913
|
+
</summary>
|
|
914
|
+
<param name="fileName">File name</param>
|
|
915
|
+
"""
|
|
916
|
+
|
|
917
|
+
GetDllLibXls().Workbook_LoadTemplateFromFile.argtypes=[c_void_p ,c_void_p]
|
|
918
|
+
CallCFunction(GetDllLibXls().Workbook_LoadTemplateFromFile, self.Ptr, fileName)
|
|
919
|
+
|
|
920
|
+
@dispatch
|
|
921
|
+
|
|
922
|
+
def LoadTemplateFromFile(self ,fileName:str,loadStyles:bool):
|
|
923
|
+
"""
|
|
924
|
+
<summary>
|
|
925
|
+
Load workbook from the excel template.
|
|
926
|
+
</summary>
|
|
927
|
+
<param name="fileName">File name</param>
|
|
928
|
+
<param name="loadStyles">Indicates whehter load styles.</param>
|
|
929
|
+
"""
|
|
930
|
+
|
|
931
|
+
GetDllLibXls().Workbook_LoadTemplateFromFileFL.argtypes=[c_void_p ,c_void_p,c_bool]
|
|
932
|
+
CallCFunction(GetDllLibXls().Workbook_LoadTemplateFromFileFL, self.Ptr, fileName,loadStyles)
|
|
933
|
+
|
|
934
|
+
@dispatch
|
|
935
|
+
|
|
936
|
+
def SaveToHtml(self ,fileName:str):
|
|
937
|
+
"""
|
|
938
|
+
<summary>
|
|
939
|
+
Saves the workbook to html
|
|
940
|
+
</summary>
|
|
941
|
+
<param name="fileName">File name.</param>
|
|
942
|
+
"""
|
|
943
|
+
|
|
944
|
+
GetDllLibXls().Workbook_SaveToHtml.argtypes=[c_void_p ,c_void_p]
|
|
945
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToHtml, self.Ptr, fileName)
|
|
946
|
+
|
|
947
|
+
@dispatch
|
|
948
|
+
|
|
949
|
+
def SaveToHtml(self ,fileName:str,skipHideSheet:bool):
|
|
950
|
+
"""
|
|
951
|
+
<summary>
|
|
952
|
+
Saves the workbook to html
|
|
953
|
+
</summary>
|
|
954
|
+
<param name="fileName">File name.</param>
|
|
955
|
+
<param name="skipHideSheet">Whether skip hidden sheet.</param>
|
|
956
|
+
"""
|
|
957
|
+
|
|
958
|
+
GetDllLibXls().Workbook_SaveToHtmlS.argtypes=[c_void_p ,c_void_p,c_bool]
|
|
959
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToHtmlS, self.Ptr, fileName,skipHideSheet)
|
|
960
|
+
|
|
961
|
+
@dispatch
|
|
962
|
+
|
|
963
|
+
def SaveToFile(self ,fileName:str):
|
|
964
|
+
"""
|
|
965
|
+
<summary>
|
|
966
|
+
Saves changes to the workbook in a different file
|
|
967
|
+
</summary>
|
|
968
|
+
<param name="fileName">File name.</param>
|
|
969
|
+
"""
|
|
970
|
+
|
|
971
|
+
GetDllLibXls().Workbook_SaveToFile.argtypes=[c_void_p ,c_void_p]
|
|
972
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFile, self.Ptr, fileName)
|
|
973
|
+
|
|
974
|
+
@dispatch
|
|
975
|
+
|
|
976
|
+
def SaveToFile(self ,fileName:str,fileFormat:FileFormat):
|
|
977
|
+
"""
|
|
978
|
+
<summary>
|
|
979
|
+
Saves changes to the workbook in a different file
|
|
980
|
+
</summary>
|
|
981
|
+
<param name="fileName">File name</param>
|
|
982
|
+
<param name="fileFormat">File format</param>
|
|
983
|
+
"""
|
|
984
|
+
enumfileFormat:c_int = fileFormat.value
|
|
985
|
+
|
|
986
|
+
GetDllLibXls().Workbook_SaveToFileF.argtypes=[c_void_p ,c_void_p,c_int]
|
|
987
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFileF, self.Ptr, fileName,enumfileFormat)
|
|
988
|
+
|
|
989
|
+
@dispatch
|
|
990
|
+
|
|
991
|
+
def SaveToFile(self ,fileName:str,separator:str):
|
|
992
|
+
"""
|
|
993
|
+
<summary>
|
|
994
|
+
Saves changes to the workbook in a different file.
|
|
995
|
+
<example>The following code illustrates how to save the active worksheet in a different file with separator:
|
|
996
|
+
<code>
|
|
997
|
+
//Create workbook
|
|
998
|
+
Workbook workbook = new Workbook();
|
|
999
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1000
|
+
//Save to file
|
|
1001
|
+
workbook.SaveToFile("Result.csv" , ",");
|
|
1002
|
+
</code>
|
|
1003
|
+
</example>
|
|
1004
|
+
</summary>
|
|
1005
|
+
<param name="fileName">File name.</param>
|
|
1006
|
+
<param name="separator">Current separator.</param>
|
|
1007
|
+
"""
|
|
1008
|
+
|
|
1009
|
+
GetDllLibXls().Workbook_SaveToFileS.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
1010
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFileS, self.Ptr, fileName,separator)
|
|
1011
|
+
|
|
1012
|
+
@dispatch
|
|
1013
|
+
|
|
1014
|
+
def SaveToFile(self ,fileName:str,separator:str,addQuotationsForStringValue:bool):
|
|
1015
|
+
"""
|
|
1016
|
+
<summary>
|
|
1017
|
+
Saves changes to the workbook in a different file.
|
|
1018
|
+
<example>The following code illustrates how to save the active worksheet in a different file with separator:
|
|
1019
|
+
<code>
|
|
1020
|
+
<para>//Create workbook</para>
|
|
1021
|
+
<para>Workbook workbook = new Workbook();</para>
|
|
1022
|
+
<para>workbook.LoadFromFile("Sample.xlsx");</para>
|
|
1023
|
+
|
|
1024
|
+
<para>//Save to file</para>
|
|
1025
|
+
<para>workbook.SaveToFile("Result.csv" , ",", true);</para>
|
|
1026
|
+
</code>
|
|
1027
|
+
</example>
|
|
1028
|
+
</summary>
|
|
1029
|
+
<param name="fileName">File name.</param>
|
|
1030
|
+
<param name="separator">Current separator.</param>
|
|
1031
|
+
<param name="addQuotationsForStringValue">Add double Quotation marks for string value.</param>
|
|
1032
|
+
"""
|
|
1033
|
+
|
|
1034
|
+
GetDllLibXls().Workbook_SaveToFileFSA.argtypes=[c_void_p ,c_void_p,c_void_p,c_bool]
|
|
1035
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFileFSA, self.Ptr, fileName,separator,addQuotationsForStringValue)
|
|
1036
|
+
|
|
1037
|
+
@dispatch
|
|
1038
|
+
|
|
1039
|
+
def SaveToFile(self ,fileName:str,fileFormat:FileFormat,retainHiddenDataToCSV:bool):
|
|
1040
|
+
"""
|
|
1041
|
+
<summary>
|
|
1042
|
+
Saves changes to the workbook in a different file
|
|
1043
|
+
</summary>
|
|
1044
|
+
<param name="fileName">File name</param>
|
|
1045
|
+
<param name="fileFormat">File format</param>
|
|
1046
|
+
<param name="retainHiddenDataToCSV">Retain hidden data when save to csv.</param>
|
|
1047
|
+
"""
|
|
1048
|
+
enumfileFormat:c_int = fileFormat.value
|
|
1049
|
+
|
|
1050
|
+
GetDllLibXls().Workbook_SaveToFileFR.argtypes=[c_void_p ,c_void_p,c_int,c_bool]
|
|
1051
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFileFR, self.Ptr, fileName,enumfileFormat,retainHiddenDataToCSV)
|
|
1052
|
+
|
|
1053
|
+
@dispatch
|
|
1054
|
+
|
|
1055
|
+
def SaveToFile(self ,fileName:str,textSaveOptions:TextSaveOptions):
|
|
1056
|
+
"""
|
|
1057
|
+
<summary>
|
|
1058
|
+
Saves changes to the workbook in a different file
|
|
1059
|
+
</summary>
|
|
1060
|
+
<param name="fileName">File name</param>
|
|
1061
|
+
<param name="textSaveOptions">Text save options.</param>
|
|
1062
|
+
"""
|
|
1063
|
+
intPtrtextSaveOptions:c_void_p = textSaveOptions.Ptr
|
|
1064
|
+
|
|
1065
|
+
GetDllLibXls().Workbook_SaveToFileByTextSaveOptions.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
1066
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFileByTextSaveOptions, self.Ptr, fileName,intPtrtextSaveOptions)
|
|
1067
|
+
|
|
1068
|
+
@dispatch
|
|
1069
|
+
|
|
1070
|
+
def SaveToFile(self ,fileName:str,version:ExcelVersion):
|
|
1071
|
+
"""
|
|
1072
|
+
<summary>
|
|
1073
|
+
Saves changes to the workbook in a different file
|
|
1074
|
+
</summary>
|
|
1075
|
+
<param name="fileName">File name</param>
|
|
1076
|
+
<param name="version">Excel version</param>
|
|
1077
|
+
"""
|
|
1078
|
+
enumversion:c_int = version.value
|
|
1079
|
+
|
|
1080
|
+
GetDllLibXls().Workbook_SaveToFileByVersion.argtypes=[c_void_p ,c_void_p,c_int]
|
|
1081
|
+
CallCFunction(GetDllLibXls().Workbook_SaveToFileByVersion, self.Ptr, fileName,enumversion)
|
|
1082
|
+
|
|
1083
|
+
def Dispose(self):
|
|
1084
|
+
"""
|
|
1085
|
+
|
|
1086
|
+
"""
|
|
1087
|
+
GetDllLibXls().Workbook_Dispose.argtypes=[c_void_p]
|
|
1088
|
+
CallCFunction(GetDllLibXls().Workbook_Dispose, self.Ptr)
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
def AddPivotTableStyle(self ,pts:'PivotTableStyle'):
|
|
1092
|
+
"""
|
|
1093
|
+
|
|
1094
|
+
"""
|
|
1095
|
+
intPtrpts:c_void_p = pts.Ptr
|
|
1096
|
+
|
|
1097
|
+
GetDllLibXls().Workbook_AddPivotTableStyle.argtypes=[c_void_p ,c_void_p]
|
|
1098
|
+
CallCFunction(GetDllLibXls().Workbook_AddPivotTableStyle, self.Ptr, intPtrpts)
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
def CaculateFormulaValue(self ,text:str)->'str':
|
|
1102
|
+
"""
|
|
1103
|
+
<summary>
|
|
1104
|
+
Computes the string formula
|
|
1105
|
+
</summary>
|
|
1106
|
+
<param name="text"></param>
|
|
1107
|
+
<returns></returns>
|
|
1108
|
+
"""
|
|
1109
|
+
|
|
1110
|
+
GetDllLibXls().Workbook_CaculateFormulaValue.argtypes=[c_void_p ,c_void_p]
|
|
1111
|
+
GetDllLibXls().Workbook_CaculateFormulaValue.restype=c_void_p
|
|
1112
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CaculateFormulaValue, self.Ptr, text)
|
|
1113
|
+
ret = None if intPtr==None else PtrToStr(intPtr)
|
|
1114
|
+
return ret
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
def CalculateAllValue(self):
|
|
1118
|
+
"""
|
|
1119
|
+
<summary>
|
|
1120
|
+
Caculate all formula for the workbook
|
|
1121
|
+
</summary>
|
|
1122
|
+
"""
|
|
1123
|
+
GetDllLibXls().Workbook_CalculateAllValue.argtypes=[c_void_p]
|
|
1124
|
+
CallCFunction(GetDllLibXls().Workbook_CalculateAllValue, self.Ptr)
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
def ChangePaletteColor(self ,color:'Color',index:int):
|
|
1128
|
+
"""
|
|
1129
|
+
<summary>
|
|
1130
|
+
Changes the palette for the spreadsheet in the specified index.
|
|
1131
|
+
<example>The following code snippet illustrates how to set palette color:
|
|
1132
|
+
<code>
|
|
1133
|
+
//Create worksheet
|
|
1134
|
+
Workbook workbook = new Workbook();
|
|
1135
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
1136
|
+
//Set palette color
|
|
1137
|
+
workbook.ChangePaletteColor(System.Drawing.Color.Red , 10);
|
|
1138
|
+
//Set color
|
|
1139
|
+
worksheet["B2"].Style.Color = workbook.Colors[10];
|
|
1140
|
+
//Save to file
|
|
1141
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
1142
|
+
</code>
|
|
1143
|
+
</example>
|
|
1144
|
+
</summary>
|
|
1145
|
+
<param name="color">Color structure</param>
|
|
1146
|
+
<param name="index">Palette index,Value should be from 0 to 55</param>
|
|
1147
|
+
"""
|
|
1148
|
+
intPtrcolor:c_void_p = color.Ptr
|
|
1149
|
+
|
|
1150
|
+
GetDllLibXls().Workbook_ChangePaletteColor.argtypes=[c_void_p ,c_void_p,c_int]
|
|
1151
|
+
CallCFunction(GetDllLibXls().Workbook_ChangePaletteColor, self.Ptr, intPtrcolor,index)
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
def ColumnWidthToPixels(self ,columnWidth:float)->float:
|
|
1155
|
+
"""
|
|
1156
|
+
<summary>
|
|
1157
|
+
onverts column width in characters into column width in pixels.
|
|
1158
|
+
</summary>
|
|
1159
|
+
<param name="columnWidth">Column width in characters.</param>
|
|
1160
|
+
<returns>Column width in pixels.</returns>
|
|
1161
|
+
"""
|
|
1162
|
+
|
|
1163
|
+
GetDllLibXls().Workbook_ColumnWidthToPixels.argtypes=[c_void_p ,c_double]
|
|
1164
|
+
GetDllLibXls().Workbook_ColumnWidthToPixels.restype=c_double
|
|
1165
|
+
ret = CallCFunction(GetDllLibXls().Workbook_ColumnWidthToPixels, self.Ptr, columnWidth)
|
|
1166
|
+
return ret
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
def ContainsFont(self ,font:'ExcelFont')->bool:
|
|
1170
|
+
"""
|
|
1171
|
+
<summary>
|
|
1172
|
+
Indicates whether the workbook contains specified font.
|
|
1173
|
+
</summary>
|
|
1174
|
+
<param name="font"></param>
|
|
1175
|
+
<returns></returns>
|
|
1176
|
+
"""
|
|
1177
|
+
intPtrfont:c_void_p = font.Ptr
|
|
1178
|
+
|
|
1179
|
+
GetDllLibXls().Workbook_ContainsFont.argtypes=[c_void_p ,c_void_p]
|
|
1180
|
+
GetDllLibXls().Workbook_ContainsFont.restype=c_bool
|
|
1181
|
+
ret = CallCFunction(GetDllLibXls().Workbook_ContainsFont, self.Ptr, intPtrfont)
|
|
1182
|
+
return ret
|
|
1183
|
+
|
|
1184
|
+
@dispatch
|
|
1185
|
+
def CopyToClipboard(self):
|
|
1186
|
+
"""
|
|
1187
|
+
<summary>
|
|
1188
|
+
Copies whole workbook to the clipboard.
|
|
1189
|
+
</summary>
|
|
1190
|
+
"""
|
|
1191
|
+
GetDllLibXls().Workbook_CopyToClipboard.argtypes=[c_void_p]
|
|
1192
|
+
CallCFunction(GetDllLibXls().Workbook_CopyToClipboard, self.Ptr)
|
|
1193
|
+
|
|
1194
|
+
@dispatch
|
|
1195
|
+
|
|
1196
|
+
def CopyToClipboard(self ,worksheet:Worksheet):
|
|
1197
|
+
"""
|
|
1198
|
+
<summary>
|
|
1199
|
+
Copies the selected worksheet to clipboard.
|
|
1200
|
+
</summary>
|
|
1201
|
+
<param name="worksheet"></param>
|
|
1202
|
+
"""
|
|
1203
|
+
intPtrworksheet:c_void_p = worksheet.Ptr
|
|
1204
|
+
|
|
1205
|
+
GetDllLibXls().Workbook_CopyToClipboardW.argtypes=[c_void_p ,c_void_p]
|
|
1206
|
+
CallCFunction(GetDllLibXls().Workbook_CopyToClipboardW, self.Ptr, intPtrworksheet)
|
|
1207
|
+
|
|
1208
|
+
@dispatch
|
|
1209
|
+
|
|
1210
|
+
def CreateEmptySheet(self)->Worksheet:
|
|
1211
|
+
"""
|
|
1212
|
+
<summary>
|
|
1213
|
+
Create a new worksheet.
|
|
1214
|
+
</summary>
|
|
1215
|
+
<returns></returns>
|
|
1216
|
+
"""
|
|
1217
|
+
GetDllLibXls().Workbook_CreateEmptySheet.argtypes=[c_void_p]
|
|
1218
|
+
GetDllLibXls().Workbook_CreateEmptySheet.restype=c_void_p
|
|
1219
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CreateEmptySheet, self.Ptr)
|
|
1220
|
+
ret = None if intPtr==None else Worksheet(intPtr)
|
|
1221
|
+
return ret
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
@dispatch
|
|
1225
|
+
|
|
1226
|
+
def CreateEmptySheet(self ,name:str)->Worksheet:
|
|
1227
|
+
"""
|
|
1228
|
+
<summary>
|
|
1229
|
+
Create a new worksheet.
|
|
1230
|
+
</summary>
|
|
1231
|
+
<param name="name">Sheet name.</param>
|
|
1232
|
+
<returns></returns>
|
|
1233
|
+
"""
|
|
1234
|
+
|
|
1235
|
+
GetDllLibXls().Workbook_CreateEmptySheetN.argtypes=[c_void_p ,c_void_p]
|
|
1236
|
+
GetDllLibXls().Workbook_CreateEmptySheetN.restype=c_void_p
|
|
1237
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CreateEmptySheetN, self.Ptr, name)
|
|
1238
|
+
ret = None if intPtr==None else Worksheet(intPtr)
|
|
1239
|
+
return ret
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
@dispatch
|
|
1243
|
+
|
|
1244
|
+
def CreateEmptySheets(self ,sheetCount:int):
|
|
1245
|
+
"""
|
|
1246
|
+
<summary>
|
|
1247
|
+
Create workbook with specified number of worksheets.
|
|
1248
|
+
</summary>
|
|
1249
|
+
<param name="sheetCount"></param>
|
|
1250
|
+
"""
|
|
1251
|
+
|
|
1252
|
+
GetDllLibXls().Workbook_CreateEmptySheets.argtypes=[c_void_p ,c_int]
|
|
1253
|
+
CallCFunction(GetDllLibXls().Workbook_CreateEmptySheets, self.Ptr, sheetCount)
|
|
1254
|
+
|
|
1255
|
+
@dispatch
|
|
1256
|
+
|
|
1257
|
+
def CreateEmptySheets(self ,sheetNames:List[str]):
|
|
1258
|
+
"""
|
|
1259
|
+
<summary>
|
|
1260
|
+
Create workbook with specified names of worksheets.
|
|
1261
|
+
</summary>
|
|
1262
|
+
<param name="sheetNames"></param>
|
|
1263
|
+
"""
|
|
1264
|
+
#arraysheetNames:ArrayTypesheetNames = ""
|
|
1265
|
+
countsheetNames = len(sheetNames)
|
|
1266
|
+
ArrayTypesheetNames = c_wchar_p * countsheetNames
|
|
1267
|
+
arraysheetNames = ArrayTypesheetNames()
|
|
1268
|
+
for i in range(0, countsheetNames):
|
|
1269
|
+
arraysheetNames[i] = sheetNames[i]
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
GetDllLibXls().Workbook_CreateEmptySheetsN.argtypes=[c_void_p ,ArrayTypesheetNames,c_int]
|
|
1273
|
+
CallCFunction(GetDllLibXls().Workbook_CreateEmptySheetsN, self.Ptr, arraysheetNames,countsheetNames)
|
|
1274
|
+
|
|
1275
|
+
@dispatch
|
|
1276
|
+
|
|
1277
|
+
def CreateFont(self)->ExcelFont:
|
|
1278
|
+
"""
|
|
1279
|
+
<summary>
|
|
1280
|
+
Creates a font object and add it to the workbook.
|
|
1281
|
+
<example>The following code illustrates how to create IFont object:
|
|
1282
|
+
<code>
|
|
1283
|
+
//Create worksheet
|
|
1284
|
+
Workbook workbook = new Workbook();
|
|
1285
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
1286
|
+
//Set text
|
|
1287
|
+
IRichTextString richText = worksheet["B2"].RichText;
|
|
1288
|
+
//Create font
|
|
1289
|
+
IFont font = workbook.CreateFont();
|
|
1290
|
+
//Set color
|
|
1291
|
+
font.Color = Color.Red;
|
|
1292
|
+
//Set text
|
|
1293
|
+
richText.Text = "Sample";
|
|
1294
|
+
//Set font
|
|
1295
|
+
richText.SetFont(0, 5, font);
|
|
1296
|
+
//Save to file
|
|
1297
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
1298
|
+
</code>
|
|
1299
|
+
</example>
|
|
1300
|
+
</summary>
|
|
1301
|
+
<returns></returns>
|
|
1302
|
+
"""
|
|
1303
|
+
GetDllLibXls().Workbook_CreateFont.argtypes=[c_void_p]
|
|
1304
|
+
GetDllLibXls().Workbook_CreateFont.restype=c_void_p
|
|
1305
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CreateFont, self.Ptr)
|
|
1306
|
+
ret = None if intPtr==None else ExcelFont(intPtr)
|
|
1307
|
+
return ret
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
@dispatch
|
|
1311
|
+
|
|
1312
|
+
def CreateFont(self ,font:Font)->ExcelFont:
|
|
1313
|
+
"""
|
|
1314
|
+
|
|
1315
|
+
"""
|
|
1316
|
+
intPtrfont:c_void_p = font.Ptr
|
|
1317
|
+
|
|
1318
|
+
GetDllLibXls().Workbook_CreateFontF.argtypes=[c_void_p ,c_void_p]
|
|
1319
|
+
GetDllLibXls().Workbook_CreateFontF.restype=c_void_p
|
|
1320
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CreateFontF, self.Ptr, intPtrfont)
|
|
1321
|
+
ret = None if intPtr==None else ExcelFont(intPtr)
|
|
1322
|
+
return ret
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
def CreatePivotStyle(self)->'PivotStyle':
|
|
1327
|
+
"""
|
|
1328
|
+
|
|
1329
|
+
"""
|
|
1330
|
+
GetDllLibXls().Workbook_CreatePivotStyle.argtypes=[c_void_p]
|
|
1331
|
+
GetDllLibXls().Workbook_CreatePivotStyle.restype=c_void_p
|
|
1332
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_CreatePivotStyle, self.Ptr)
|
|
1333
|
+
ret = None if intPtr==None else PivotStyle(intPtr)
|
|
1334
|
+
return ret
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
#
|
|
1338
|
+
# def FindAllBool(self ,boolValue:bool)->'ListCellRanges':
|
|
1339
|
+
# """
|
|
1340
|
+
# <summary>
|
|
1341
|
+
# Finds the cell with the input bool.
|
|
1342
|
+
# <example>This sample shows how to find all cells with specified bool value:
|
|
1343
|
+
# <code>
|
|
1344
|
+
# //Create workbook
|
|
1345
|
+
# Workbook workbook = new Workbook();
|
|
1346
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1347
|
+
# //Find cells with specified bool value
|
|
1348
|
+
# CellRange[] result = workbook.FindAllBool(true);
|
|
1349
|
+
# </code>
|
|
1350
|
+
# </example>
|
|
1351
|
+
# </summary>
|
|
1352
|
+
# <param name="boolValue">Bool value to search for</param>
|
|
1353
|
+
# <returns>Found ranges</returns>
|
|
1354
|
+
# """
|
|
1355
|
+
#
|
|
1356
|
+
# GetDllLibXls().Workbook_FindAllBool.argtypes=[c_void_p ,c_bool]
|
|
1357
|
+
# GetDllLibXls().Workbook_FindAllBool.restype=c_void_p
|
|
1358
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_FindAllBool, self.Ptr, boolValue)
|
|
1359
|
+
# ret = None if intPtr==None else ListCellRanges(intPtr)
|
|
1360
|
+
# return ret
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
#
|
|
1364
|
+
# def FindAllNumber(self ,doubleValue:float,formulaValue:bool)->'ListCellRanges':
|
|
1365
|
+
# """
|
|
1366
|
+
# <summary>
|
|
1367
|
+
# Finds the cell with the input double.
|
|
1368
|
+
# <example>This sample shows how to find all cells with specified doulbe value:
|
|
1369
|
+
# <code>
|
|
1370
|
+
# //Create workbook
|
|
1371
|
+
# Workbook workbook = new Workbook();
|
|
1372
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1373
|
+
# //Find cells with specified double value
|
|
1374
|
+
# CellRange[] result = workbook.FindAllNumber(100.32 , false);
|
|
1375
|
+
# </code>
|
|
1376
|
+
# </example>
|
|
1377
|
+
# </summary>
|
|
1378
|
+
# <param name="doubleValue">Double value to search for.</param>
|
|
1379
|
+
# <param name="formulaValue">Indicates whether includes formula value to search for.</param>
|
|
1380
|
+
# <returns>Found ranges.</returns>
|
|
1381
|
+
# """
|
|
1382
|
+
#
|
|
1383
|
+
# GetDllLibXls().Workbook_FindAllNumber.argtypes=[c_void_p ,c_double,c_bool]
|
|
1384
|
+
# GetDllLibXls().Workbook_FindAllNumber.restype=c_void_p
|
|
1385
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_FindAllNumber, self.Ptr, doubleValue,formulaValue)
|
|
1386
|
+
# ret = None if intPtr==None else ListCellRanges(intPtr)
|
|
1387
|
+
# return ret
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
#
|
|
1391
|
+
# def FindAllString(self ,stringValue:str,formula:bool,formulaValue:bool)->'ListCellRanges':
|
|
1392
|
+
# """
|
|
1393
|
+
# <summary>
|
|
1394
|
+
# Finds the cell with the input string.
|
|
1395
|
+
# <example>This sample shows how to find all cells with specified string value:
|
|
1396
|
+
# <code>
|
|
1397
|
+
# //Create workbook
|
|
1398
|
+
# Workbook workbook = new Workbook();
|
|
1399
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1400
|
+
# //Find cells with specified string value
|
|
1401
|
+
# string value = "value";
|
|
1402
|
+
# CellRange[] result = workbook.FindAllString(value , false , false);
|
|
1403
|
+
# </code>
|
|
1404
|
+
# </example>
|
|
1405
|
+
# </summary>
|
|
1406
|
+
# <param name="stringValue">String value to search for</param>
|
|
1407
|
+
# <param name="formula">Indicates whether includes formula to search for.</param>
|
|
1408
|
+
# <param name="formulaValue">Indicates whether includes formula value to search for.</param>
|
|
1409
|
+
# <returns>Found ranges.</returns>
|
|
1410
|
+
# """
|
|
1411
|
+
#
|
|
1412
|
+
# GetDllLibXls().Workbook_FindAllString.argtypes=[c_void_p ,c_void_p,c_bool,c_bool]
|
|
1413
|
+
# GetDllLibXls().Workbook_FindAllString.restype=c_void_p
|
|
1414
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_FindAllString, self.Ptr, stringValue,formula,formulaValue)
|
|
1415
|
+
# ret = None if intPtr==None else ListCellRanges(intPtr)
|
|
1416
|
+
# return ret
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
#
|
|
1420
|
+
# def FindAllDateTime(self ,dateTimeValue:'DateTime')->'ListCellRanges':
|
|
1421
|
+
# """
|
|
1422
|
+
# <summary>
|
|
1423
|
+
# Finds the cell with the input datetime.
|
|
1424
|
+
# <example>This sample shows how to find all cells with specified DateTime value:
|
|
1425
|
+
# <code>
|
|
1426
|
+
# //Create workbook
|
|
1427
|
+
# Workbook workbook = new Workbook();
|
|
1428
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1429
|
+
# //Find cells with specified DateTime value
|
|
1430
|
+
# CellRange[] result = workbook.FindAllDateTime(DateTime.Now);
|
|
1431
|
+
# </code>
|
|
1432
|
+
# </example>
|
|
1433
|
+
# </summary>
|
|
1434
|
+
# <param name="dateTimeValue">Datetime value to search for.</param>
|
|
1435
|
+
# <returns>Found ranges.</returns>
|
|
1436
|
+
# """
|
|
1437
|
+
# intPtrdateTimeValue:c_void_p = dateTimeValue.Ptr
|
|
1438
|
+
#
|
|
1439
|
+
# GetDllLibXls().Workbook_FindAllDateTime.argtypes=[c_void_p ,c_void_p]
|
|
1440
|
+
# GetDllLibXls().Workbook_FindAllDateTime.restype=c_void_p
|
|
1441
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_FindAllDateTime, self.Ptr, intPtrdateTimeValue)
|
|
1442
|
+
# ret = None if intPtr==None else ListCellRanges(intPtr)
|
|
1443
|
+
# return ret
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
#
|
|
1447
|
+
# def FindAllTimeSpan(self ,timeSpanValue:'TimeSpan')->'ListCellRanges':
|
|
1448
|
+
# """
|
|
1449
|
+
# <summary>
|
|
1450
|
+
# Finds the cell with the input time span.
|
|
1451
|
+
# <example>This sample shows how to find all cells with specified TimeSpan value:
|
|
1452
|
+
# <code>
|
|
1453
|
+
# //Create workbook
|
|
1454
|
+
# Workbook workbook = new Workbook();
|
|
1455
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1456
|
+
# //Find cells with specified TimeSpan value
|
|
1457
|
+
# TimeSpan value = new TimeSpan(2, 30, 30);
|
|
1458
|
+
# CellRange[] result = workbook.FindAllTimeSpan(value);
|
|
1459
|
+
# </code>
|
|
1460
|
+
# </example>
|
|
1461
|
+
# </summary>
|
|
1462
|
+
# <param name="timeSpanValue"></param>
|
|
1463
|
+
# <returns>Found ranges.</returns>
|
|
1464
|
+
# """
|
|
1465
|
+
# intPtrtimeSpanValue:c_void_p = timeSpanValue.Ptr
|
|
1466
|
+
#
|
|
1467
|
+
# GetDllLibXls().Workbook_FindAllTimeSpan.argtypes=[c_void_p ,c_void_p]
|
|
1468
|
+
# GetDllLibXls().Workbook_FindAllTimeSpan.restype=c_void_p
|
|
1469
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_FindAllTimeSpan, self.Ptr, intPtrtimeSpanValue)
|
|
1470
|
+
# ret = None if intPtr==None else ListCellRanges(intPtr)
|
|
1471
|
+
# return ret
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
def FindBool(self ,boolValue:bool)->'CellRange':
|
|
1476
|
+
"""
|
|
1477
|
+
<summary>
|
|
1478
|
+
Finds the cell with the input bool.
|
|
1479
|
+
<example>This sample shows how to find the first cell with specified bool value:
|
|
1480
|
+
<code>
|
|
1481
|
+
//Create workbook
|
|
1482
|
+
Workbook workbook = new Workbook();
|
|
1483
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1484
|
+
//Find cell with specified bool value
|
|
1485
|
+
IXLSRange result = workbook.FindBool(true);
|
|
1486
|
+
</code>
|
|
1487
|
+
</example>
|
|
1488
|
+
</summary>
|
|
1489
|
+
<param name="boolValue">Bool value to search for.</param>
|
|
1490
|
+
<returns>Found range.</returns>
|
|
1491
|
+
"""
|
|
1492
|
+
|
|
1493
|
+
GetDllLibXls().Workbook_FindBool.argtypes=[c_void_p ,c_bool]
|
|
1494
|
+
GetDllLibXls().Workbook_FindBool.restype=c_void_p
|
|
1495
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FindBool, self.Ptr, boolValue)
|
|
1496
|
+
ret = None if intPtr==None else CellRange(intPtr)
|
|
1497
|
+
return ret
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
def FindNumber(self ,doubleValue:float,formulaValue:bool)->'CellRange':
|
|
1502
|
+
"""
|
|
1503
|
+
<summary>
|
|
1504
|
+
Finds the cell with the input number.
|
|
1505
|
+
<example>This sample shows how to find the first cell with specified double value:
|
|
1506
|
+
<code>
|
|
1507
|
+
//Create workbook
|
|
1508
|
+
Workbook workbook = new Workbook();
|
|
1509
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1510
|
+
//Find cell with specified double value
|
|
1511
|
+
double value = 9.00;
|
|
1512
|
+
IXLSRange result = workbook.FindNumber(value, false);
|
|
1513
|
+
</code>
|
|
1514
|
+
</example>
|
|
1515
|
+
</summary>
|
|
1516
|
+
<param name="doubleValue">Double value to search for.</param>
|
|
1517
|
+
<param name="formulaValue">Indicates whether includes formula value to search for.</param>
|
|
1518
|
+
<returns>Found range.</returns>
|
|
1519
|
+
"""
|
|
1520
|
+
|
|
1521
|
+
GetDllLibXls().Workbook_FindNumber.argtypes=[c_void_p ,c_double,c_bool]
|
|
1522
|
+
GetDllLibXls().Workbook_FindNumber.restype=c_void_p
|
|
1523
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FindNumber, self.Ptr, doubleValue,formulaValue)
|
|
1524
|
+
ret = None if intPtr==None else CellRange(intPtr)
|
|
1525
|
+
return ret
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
def FindString(self ,stringValue:str,formula:bool,formulaValue:bool)->'CellRange':
|
|
1530
|
+
"""
|
|
1531
|
+
<summary>
|
|
1532
|
+
Finds the cell with the input string.
|
|
1533
|
+
<example>This sample shows how to find the first cell with specified string value:
|
|
1534
|
+
<code>
|
|
1535
|
+
//Create workbook
|
|
1536
|
+
Workbook workbook = new Workbook();
|
|
1537
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1538
|
+
//Find cell with specified string value
|
|
1539
|
+
string value = "value";
|
|
1540
|
+
IXLSRange result = workbook.FindString(value, false, false);
|
|
1541
|
+
</code>
|
|
1542
|
+
</example>
|
|
1543
|
+
</summary>
|
|
1544
|
+
<param name="stringValue">String value to search for.</param>
|
|
1545
|
+
<param name="formula">Indicates whether includes formula to search for.</param>
|
|
1546
|
+
<param name="formulaValue">Indicates whether includes formula value to search for.</param>
|
|
1547
|
+
<returns>Found range.</returns>
|
|
1548
|
+
"""
|
|
1549
|
+
|
|
1550
|
+
GetDllLibXls().Workbook_FindString.argtypes=[c_void_p ,c_void_p,c_bool,c_bool]
|
|
1551
|
+
GetDllLibXls().Workbook_FindString.restype=c_void_p
|
|
1552
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FindString, self.Ptr, stringValue,formula,formulaValue)
|
|
1553
|
+
ret = None if intPtr==None else CellRange(intPtr)
|
|
1554
|
+
return ret
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
def FindDateTime(self ,dateTimeValue:'DateTime')->'CellRange':
|
|
1559
|
+
"""
|
|
1560
|
+
<summary>
|
|
1561
|
+
Finds the cell with the input datetime.
|
|
1562
|
+
<example>This sample shows how to find the first cell with specified DataTime value:
|
|
1563
|
+
<code>
|
|
1564
|
+
//Create workbook
|
|
1565
|
+
Workbook workbook = new Workbook();
|
|
1566
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1567
|
+
//Find cell with specified DataTime value
|
|
1568
|
+
DateTime dateTime = DateTime.Now;
|
|
1569
|
+
IXLSRange result = workbook.FindDateTime(dateTime);
|
|
1570
|
+
</code>
|
|
1571
|
+
</example>
|
|
1572
|
+
</summary>
|
|
1573
|
+
<param name="dateTimeValue">Datetime value to search for.</param>
|
|
1574
|
+
<returns>Found range.</returns>
|
|
1575
|
+
"""
|
|
1576
|
+
intPtrdateTimeValue:c_void_p = dateTimeValue.Ptr
|
|
1577
|
+
|
|
1578
|
+
GetDllLibXls().Workbook_FindDateTime.argtypes=[c_void_p ,c_void_p]
|
|
1579
|
+
GetDllLibXls().Workbook_FindDateTime.restype=c_void_p
|
|
1580
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FindDateTime, self.Ptr, intPtrdateTimeValue)
|
|
1581
|
+
ret = None if intPtr==None else CellRange(intPtr)
|
|
1582
|
+
return ret
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
def FindTimeSpan(self ,timeSpanValue:'TimeSpan')->'CellRange':
|
|
1587
|
+
"""
|
|
1588
|
+
<summary>
|
|
1589
|
+
Finds the cell with the input time span.
|
|
1590
|
+
<example>This sample shows how to find the first cell with specified TimeSpan value:
|
|
1591
|
+
<code>
|
|
1592
|
+
//Create workbook
|
|
1593
|
+
Workbook workbook = new Workbook();
|
|
1594
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1595
|
+
//Find cell with specified TimeSpan value
|
|
1596
|
+
TimeSpan timeSpan = new TimeSpan(2, 30, 30);
|
|
1597
|
+
IXLSRange result = workbook.FindTimeSpan(timeSpan);
|
|
1598
|
+
</code>
|
|
1599
|
+
</example>
|
|
1600
|
+
</summary>
|
|
1601
|
+
<param name="timeSpanValue">Time span value to search for.</param>
|
|
1602
|
+
<returns>Found range.</returns>
|
|
1603
|
+
"""
|
|
1604
|
+
intPtrtimeSpanValue:c_void_p = timeSpanValue.Ptr
|
|
1605
|
+
|
|
1606
|
+
GetDllLibXls().Workbook_FindTimeSpan.argtypes=[c_void_p ,c_void_p]
|
|
1607
|
+
GetDllLibXls().Workbook_FindTimeSpan.restype=c_void_p
|
|
1608
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FindTimeSpan, self.Ptr, intPtrtimeSpanValue)
|
|
1609
|
+
ret = None if intPtr==None else CellRange(intPtr)
|
|
1610
|
+
return ret
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
@dispatch
|
|
1614
|
+
|
|
1615
|
+
def GetMatchingColor(self ,color:Color)->ExcelColors:
|
|
1616
|
+
"""
|
|
1617
|
+
<summary>
|
|
1618
|
+
Find best matching Color in workbook palette.
|
|
1619
|
+
<example>The following code illustrates how to get the indexed color from ExcelColors for the given color from Color structure:
|
|
1620
|
+
<code>
|
|
1621
|
+
//Create worksheet
|
|
1622
|
+
Workbook workbook = new Workbook();
|
|
1623
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
1624
|
+
//Get color
|
|
1625
|
+
ExcelColors color = workbook.GetMatchingColor(System.Drawing.Color.Red);
|
|
1626
|
+
//Set color
|
|
1627
|
+
worksheet["B2"].Style.KnownColor = color;
|
|
1628
|
+
//Save to file
|
|
1629
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
1630
|
+
</code>
|
|
1631
|
+
</example>
|
|
1632
|
+
</summary>
|
|
1633
|
+
<param name="color">Color to search for.</param>
|
|
1634
|
+
<returns>Workbook palette color.</returns>
|
|
1635
|
+
"""
|
|
1636
|
+
intPtrcolor:c_void_p = color.Ptr
|
|
1637
|
+
|
|
1638
|
+
GetDllLibXls().Workbook_GetMatchingColor.argtypes=[c_void_p ,c_void_p]
|
|
1639
|
+
GetDllLibXls().Workbook_GetMatchingColor.restype=c_int
|
|
1640
|
+
ret = CallCFunction(GetDllLibXls().Workbook_GetMatchingColor, self.Ptr, intPtrcolor)
|
|
1641
|
+
objwraped = ExcelColors(ret)
|
|
1642
|
+
return objwraped
|
|
1643
|
+
|
|
1644
|
+
@dispatch
|
|
1645
|
+
|
|
1646
|
+
def GetMatchingColor(self ,r:int,g:int,b:int)->ExcelColors:
|
|
1647
|
+
"""
|
|
1648
|
+
<summary>
|
|
1649
|
+
Find best matching Color in workbook palette.
|
|
1650
|
+
<example>The following code illustrates how to get the indexed color from ExcelColors for the given color from Color structure:
|
|
1651
|
+
<code>
|
|
1652
|
+
//Create worksheet
|
|
1653
|
+
Workbook workbook = new Workbook();
|
|
1654
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
1655
|
+
//Get color
|
|
1656
|
+
ExcelColors color = workbook.GetMatchingColor(255, 0, 0);
|
|
1657
|
+
//Set color
|
|
1658
|
+
worksheet["B2"].Style.KnownColor = color;
|
|
1659
|
+
//Save to file
|
|
1660
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
1661
|
+
</code>
|
|
1662
|
+
</example>
|
|
1663
|
+
</summary>
|
|
1664
|
+
<param name="r">Red color.</param>
|
|
1665
|
+
<param name="g">Green color.</param>
|
|
1666
|
+
<param name="b">Blue color.</param>
|
|
1667
|
+
<returns>Workbook palette color.</returns>
|
|
1668
|
+
"""
|
|
1669
|
+
|
|
1670
|
+
GetDllLibXls().Workbook_GetMatchingColorRGB.argtypes=[c_void_p ,c_int,c_int,c_int]
|
|
1671
|
+
GetDllLibXls().Workbook_GetMatchingColorRGB.restype=c_int
|
|
1672
|
+
ret = CallCFunction(GetDllLibXls().Workbook_GetMatchingColorRGB, self.Ptr, r,g,b)
|
|
1673
|
+
objwraped = ExcelColors(ret)
|
|
1674
|
+
return objwraped
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
def GetPaletteColor(self ,color:'ExcelColors')->'Color':
|
|
1678
|
+
"""
|
|
1679
|
+
<summary>
|
|
1680
|
+
Gets excel color from workbook palette.
|
|
1681
|
+
<example>The following code illustrates how to get the RGB color value for the specified color from ExcelColors enumeration:
|
|
1682
|
+
<code>
|
|
1683
|
+
//Create worksheet
|
|
1684
|
+
Workbook workbook = new Workbook();
|
|
1685
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
1686
|
+
//Get color
|
|
1687
|
+
System.Drawing.Color color = workbook.GetPaletteColor(ExcelColors.Red);
|
|
1688
|
+
//Set color
|
|
1689
|
+
worksheet["B2"].Style.Color = workbook.Colors[10];
|
|
1690
|
+
//Save to file
|
|
1691
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
1692
|
+
</code>
|
|
1693
|
+
</example>
|
|
1694
|
+
</summary>
|
|
1695
|
+
<param name="color">Index from palette array.</param>
|
|
1696
|
+
<returns>RGB Color.</returns>
|
|
1697
|
+
"""
|
|
1698
|
+
enumcolor:c_int = color.value
|
|
1699
|
+
|
|
1700
|
+
GetDllLibXls().Workbook_GetPaletteColor.argtypes=[c_void_p ,c_int]
|
|
1701
|
+
GetDllLibXls().Workbook_GetPaletteColor.restype=c_void_p
|
|
1702
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_GetPaletteColor, self.Ptr, enumcolor)
|
|
1703
|
+
ret = None if intPtr==None else Color(intPtr)
|
|
1704
|
+
return ret
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
#
|
|
1708
|
+
# def GetSplitPageInfo(self)->'List1':
|
|
1709
|
+
# """
|
|
1710
|
+
#
|
|
1711
|
+
# """
|
|
1712
|
+
# GetDllLibXls().Workbook_GetSplitPageInfo.argtypes=[c_void_p]
|
|
1713
|
+
# GetDllLibXls().Workbook_GetSplitPageInfo.restype=c_void_p
|
|
1714
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_GetSplitPageInfo, self.Ptr)
|
|
1715
|
+
# ret = None if intPtr==None else List1(intPtr)
|
|
1716
|
+
# return ret
|
|
1717
|
+
#
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
#
|
|
1721
|
+
# def GetSplitPageTable(self ,wb:'Workbook')->'DataTable':
|
|
1722
|
+
# """
|
|
1723
|
+
#
|
|
1724
|
+
# """
|
|
1725
|
+
# intPtrwb:c_void_p = wb.Ptr
|
|
1726
|
+
#
|
|
1727
|
+
# GetDllLibXls().Workbook_GetSplitPageTable.argtypes=[c_void_p ,c_void_p]
|
|
1728
|
+
# GetDllLibXls().Workbook_GetSplitPageTable.restype=c_void_p
|
|
1729
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_GetSplitPageTable, self.Ptr, intPtrwb)
|
|
1730
|
+
# ret = None if intPtr==None else DataTable(intPtr)
|
|
1731
|
+
# return ret
|
|
1732
|
+
#
|
|
1733
|
+
|
|
1734
|
+
|
|
1735
|
+
def InitCalcEngine(self):
|
|
1736
|
+
"""
|
|
1737
|
+
<summary>
|
|
1738
|
+
Initilize Calc engine
|
|
1739
|
+
</summary>
|
|
1740
|
+
"""
|
|
1741
|
+
GetDllLibXls().Workbook_InitCalcEngine.argtypes=[c_void_p]
|
|
1742
|
+
CallCFunction(GetDllLibXls().Workbook_InitCalcEngine, self.Ptr)
|
|
1743
|
+
|
|
1744
|
+
@staticmethod
|
|
1745
|
+
@dispatch
|
|
1746
|
+
|
|
1747
|
+
def IsPasswordProtected(fileName:str)->bool:
|
|
1748
|
+
"""
|
|
1749
|
+
<summary>
|
|
1750
|
+
check file is password protect
|
|
1751
|
+
</summary>
|
|
1752
|
+
<param name="fileName"></param>
|
|
1753
|
+
<returns></returns>
|
|
1754
|
+
"""
|
|
1755
|
+
|
|
1756
|
+
GetDllLibXls().Workbook_IsPasswordProtected.argtypes=[ c_void_p]
|
|
1757
|
+
GetDllLibXls().Workbook_IsPasswordProtected.restype=c_bool
|
|
1758
|
+
ret = CallCFunction(GetDllLibXls().Workbook_IsPasswordProtected, fileName)
|
|
1759
|
+
return ret
|
|
1760
|
+
|
|
1761
|
+
@staticmethod
|
|
1762
|
+
@dispatch
|
|
1763
|
+
|
|
1764
|
+
def IsPasswordProtected(stream:Stream)->bool:
|
|
1765
|
+
"""
|
|
1766
|
+
|
|
1767
|
+
"""
|
|
1768
|
+
intPtrstream:c_void_p = stream.Ptr
|
|
1769
|
+
|
|
1770
|
+
GetDllLibXls().Workbook_IsPasswordProtectedByStream.argtypes=[ c_void_p]
|
|
1771
|
+
GetDllLibXls().Workbook_IsPasswordProtectedByStream.restype=c_bool
|
|
1772
|
+
ret = CallCFunction(GetDllLibXls().Workbook_IsPasswordProtectedByStream, intPtrstream)
|
|
1773
|
+
return ret
|
|
1774
|
+
|
|
1775
|
+
def PasteFromClipboard(self):
|
|
1776
|
+
"""
|
|
1777
|
+
<summary>
|
|
1778
|
+
Copies workbook and all its worksheets from the clipboard.
|
|
1779
|
+
</summary>
|
|
1780
|
+
"""
|
|
1781
|
+
GetDllLibXls().Workbook_PasteFromClipboard.argtypes=[c_void_p]
|
|
1782
|
+
CallCFunction(GetDllLibXls().Workbook_PasteFromClipboard, self.Ptr)
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
def PixelsToColumnWidth(self ,pixels:float)->float:
|
|
1786
|
+
"""
|
|
1787
|
+
<summary>
|
|
1788
|
+
Converts column width in pixels into column width in characters.
|
|
1789
|
+
</summary>
|
|
1790
|
+
<param name="pixels">Column width in pixels.</param>
|
|
1791
|
+
<returns>Column width in characters.</returns>
|
|
1792
|
+
"""
|
|
1793
|
+
|
|
1794
|
+
GetDllLibXls().Workbook_PixelsToColumnWidth.argtypes=[c_void_p ,c_double]
|
|
1795
|
+
GetDllLibXls().Workbook_PixelsToColumnWidth.restype=c_double
|
|
1796
|
+
ret = CallCFunction(GetDllLibXls().Workbook_PixelsToColumnWidth, self.Ptr, pixels)
|
|
1797
|
+
return ret
|
|
1798
|
+
|
|
1799
|
+
@dispatch
|
|
1800
|
+
|
|
1801
|
+
def Protect(self ,passwordToOpen:str):
|
|
1802
|
+
"""
|
|
1803
|
+
<summary>
|
|
1804
|
+
protect file also protect workbook window and structure.
|
|
1805
|
+
</summary>
|
|
1806
|
+
<param name="passwordToOpen">password to open file.</param>
|
|
1807
|
+
"""
|
|
1808
|
+
|
|
1809
|
+
GetDllLibXls().Workbook_Protect.argtypes=[c_void_p ,c_void_p]
|
|
1810
|
+
CallCFunction(GetDllLibXls().Workbook_Protect, self.Ptr, passwordToOpen)
|
|
1811
|
+
|
|
1812
|
+
@dispatch
|
|
1813
|
+
|
|
1814
|
+
def Protect(self ,passwordToOpen:str,bIsProtectWindow:bool,bIsProtectContent:bool):
|
|
1815
|
+
"""
|
|
1816
|
+
<summary>
|
|
1817
|
+
protect file,also Indicates whether protect workbook window and structure or not
|
|
1818
|
+
</summary>
|
|
1819
|
+
<param name="passwordToOpen">password to open file.</param>
|
|
1820
|
+
<param name="bIsProtectWindow">Indicates if protect workbook window.</param>
|
|
1821
|
+
<param name="bIsProtectContent">Indicates if protect workbook content.</param>
|
|
1822
|
+
"""
|
|
1823
|
+
|
|
1824
|
+
GetDllLibXls().Workbook_ProtectB.argtypes=[c_void_p ,c_void_p,c_bool,c_bool]
|
|
1825
|
+
CallCFunction(GetDllLibXls().Workbook_ProtectB, self.Ptr, passwordToOpen,bIsProtectWindow,bIsProtectContent)
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
def ProtectWorkbook(self ,bIsProtectWindow:bool,bIsProtectContent:bool,password:str):
|
|
1829
|
+
"""
|
|
1830
|
+
<summary>
|
|
1831
|
+
Sets protection for workbook.
|
|
1832
|
+
</summary>
|
|
1833
|
+
<param name="bIsProtectWindow">Indicates if protect workbook window.</param>
|
|
1834
|
+
<param name="bIsProtectContent">Indicates if protect workbook content.</param>
|
|
1835
|
+
<param name="password">password</param>
|
|
1836
|
+
"""
|
|
1837
|
+
|
|
1838
|
+
GetDllLibXls().Workbook_ProtectWorkbook.argtypes=[c_void_p ,c_bool,c_bool,c_void_p]
|
|
1839
|
+
CallCFunction(GetDllLibXls().Workbook_ProtectWorkbook, self.Ptr, bIsProtectWindow,bIsProtectContent,password)
|
|
1840
|
+
|
|
1841
|
+
# @dispatch
|
|
1842
|
+
#
|
|
1843
|
+
# def Replace(self ,oldValue:str,newValues:'DataColumn',includeColumnName:bool):
|
|
1844
|
+
# """
|
|
1845
|
+
# <summary>
|
|
1846
|
+
# Replaces cell's value from data column values.
|
|
1847
|
+
# <example>The following code snippet illustrates how to replace the string value with data column:
|
|
1848
|
+
# <code>
|
|
1849
|
+
# //Create workbook
|
|
1850
|
+
# Workbook workbook = new Workbook();
|
|
1851
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1852
|
+
# //Replace the oldValue by data column
|
|
1853
|
+
# string oldValue = "Find";
|
|
1854
|
+
# System.Data.DataTable table = new System.Data.DataTable();
|
|
1855
|
+
# table.Columns.Add("Dosage", typeof(int));
|
|
1856
|
+
# table.Rows.Add(1);
|
|
1857
|
+
# System.Data.DataColumn dataColumn = table.Columns[0];
|
|
1858
|
+
# workbook.Replace(oldValue, dataColumn, true);
|
|
1859
|
+
# //Save to file
|
|
1860
|
+
# workbook.SaveToFile("Replace.xlsx");
|
|
1861
|
+
# </code>
|
|
1862
|
+
# </example>
|
|
1863
|
+
# </summary>
|
|
1864
|
+
# <param name="oldValue">Value to replace.</param>
|
|
1865
|
+
# <param name="newValues">New data.</param>
|
|
1866
|
+
# <param name="includeColumnName">Indicates whether includes column name.</param>
|
|
1867
|
+
# """
|
|
1868
|
+
# intPtrnewValues:c_void_p = newValues.Ptr
|
|
1869
|
+
#
|
|
1870
|
+
# GetDllLibXls().Workbook_Replace.argtypes=[c_void_p ,c_void_p,c_void_p,c_bool]
|
|
1871
|
+
# CallCFunction(GetDllLibXls().Workbook_Replace, self.Ptr, oldValue,intPtrnewValues,includeColumnName)
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
# @dispatch
|
|
1875
|
+
#
|
|
1876
|
+
# def Replace(self ,oldValue:str,newValues:'DataTable',includeColumnName:bool):
|
|
1877
|
+
# """
|
|
1878
|
+
# <summary>
|
|
1879
|
+
# Replaces cell's value from data table values.
|
|
1880
|
+
# <example>The following code snippet illustrates how to replace the string value with data table:
|
|
1881
|
+
# <code>
|
|
1882
|
+
# //Create workbook
|
|
1883
|
+
# Workbook workbook = new Workbook();
|
|
1884
|
+
# workbook.LoadFromFile("Sample.xlsx");
|
|
1885
|
+
# //Replace the oldValue by data table
|
|
1886
|
+
# string oldValue = "Find";
|
|
1887
|
+
# System.Data.DataTable table = new System.Data.DataTable();
|
|
1888
|
+
# table.Columns.Add("Dosage", typeof(int));
|
|
1889
|
+
# table.Rows.Add(1);
|
|
1890
|
+
# workbook.Replace(oldValue, table, true);
|
|
1891
|
+
# //Save to file
|
|
1892
|
+
# workbook.SaveToFile("Replace.xlsx");
|
|
1893
|
+
# </code>
|
|
1894
|
+
# </example>
|
|
1895
|
+
# </summary>
|
|
1896
|
+
# <param name="oldValue">Value to replace.</param>
|
|
1897
|
+
# <param name="newValues">New data.</param>
|
|
1898
|
+
# <param name="includeColumnName">Indicates whether includes column name.</param>
|
|
1899
|
+
# """
|
|
1900
|
+
# intPtrnewValues:c_void_p = newValues.Ptr
|
|
1901
|
+
#
|
|
1902
|
+
# GetDllLibXls().Workbook_ReplaceONI.argtypes=[c_void_p ,c_void_p,c_void_p,c_bool]
|
|
1903
|
+
# CallCFunction(GetDllLibXls().Workbook_ReplaceONI, self.Ptr, oldValue,intPtrnewValues,includeColumnName)
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
@dispatch
|
|
1907
|
+
|
|
1908
|
+
def Replace(self ,oldValue:str,newValue:DateTime):
|
|
1909
|
+
"""
|
|
1910
|
+
<summary>
|
|
1911
|
+
Replaces cell's value by specified value.
|
|
1912
|
+
<example>The following code illustrates how to replace the string value with datetime:
|
|
1913
|
+
<code>
|
|
1914
|
+
//Create workbook
|
|
1915
|
+
Workbook workbook = new Workbook();
|
|
1916
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1917
|
+
//Replace the oldValue by dateTime
|
|
1918
|
+
string oldValue = "Find";
|
|
1919
|
+
DateTime dateTime = DateTime.Now;
|
|
1920
|
+
workbook.Replace(oldValue, dateTime);
|
|
1921
|
+
//Save to file
|
|
1922
|
+
workbook.SaveToFile("Replace.xlsx");
|
|
1923
|
+
</code>
|
|
1924
|
+
</example>
|
|
1925
|
+
</summary>
|
|
1926
|
+
<param name="oldValue">Value to replace.</param>
|
|
1927
|
+
<param name="newValue">New value</param>
|
|
1928
|
+
"""
|
|
1929
|
+
intPtrnewValue:c_void_p = newValue.Ptr
|
|
1930
|
+
|
|
1931
|
+
GetDllLibXls().Workbook_ReplaceDT.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
1932
|
+
CallCFunction(GetDllLibXls().Workbook_ReplaceDT, self.Ptr, oldValue,intPtrnewValue)
|
|
1933
|
+
|
|
1934
|
+
@dispatch
|
|
1935
|
+
|
|
1936
|
+
def Replace(self ,oldValue:str,newValue:float):
|
|
1937
|
+
"""
|
|
1938
|
+
<summary>
|
|
1939
|
+
Replaces cell's value by specified value.
|
|
1940
|
+
<example>The following code snippet illustrates how to replace the string with double:
|
|
1941
|
+
<code>
|
|
1942
|
+
//Create workbook
|
|
1943
|
+
Workbook workbook = new Workbook();
|
|
1944
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1945
|
+
//Replace the oldValue by double
|
|
1946
|
+
string oldValue = "Ten";
|
|
1947
|
+
workbook.Replace(oldValue, 10.0);
|
|
1948
|
+
//Save to file
|
|
1949
|
+
workbook.SaveToFile("Replace.xlsx");
|
|
1950
|
+
</code>
|
|
1951
|
+
</example>
|
|
1952
|
+
</summary>
|
|
1953
|
+
<param name="oldValue">Value to replace.</param>
|
|
1954
|
+
<param name="newValue">New value.</param>
|
|
1955
|
+
"""
|
|
1956
|
+
|
|
1957
|
+
GetDllLibXls().Workbook_ReplaceD.argtypes=[c_void_p ,c_void_p,c_double]
|
|
1958
|
+
CallCFunction(GetDllLibXls().Workbook_ReplaceD, self.Ptr, oldValue,newValue)
|
|
1959
|
+
|
|
1960
|
+
@dispatch
|
|
1961
|
+
|
|
1962
|
+
def Replace(self ,oldValue:str,newValues:List[float],isVertical:bool):
|
|
1963
|
+
"""
|
|
1964
|
+
<summary>
|
|
1965
|
+
Replaces cell's value from array.
|
|
1966
|
+
<example>The following code snippet illustrates how to replace the string with array of double values:
|
|
1967
|
+
<code>
|
|
1968
|
+
//Create workbook
|
|
1969
|
+
Workbook workbook = new Workbook();
|
|
1970
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
1971
|
+
//Replace the oldValue by array of double values
|
|
1972
|
+
string oldValue = "Find";
|
|
1973
|
+
double[] newValues = { 1.0, 2.0 };
|
|
1974
|
+
workbook.Replace(oldValue, newValues, true);
|
|
1975
|
+
//Save to file
|
|
1976
|
+
workbook.SaveToFile("Replace.xlsx");
|
|
1977
|
+
</code>
|
|
1978
|
+
</example>
|
|
1979
|
+
</summary>
|
|
1980
|
+
<param name="oldValue">Value to replace.</param>
|
|
1981
|
+
<param name="newValues">New values.</param>
|
|
1982
|
+
<param name="isVertical">Indicates whether new values should be inserted vertically.</param>
|
|
1983
|
+
"""
|
|
1984
|
+
#arraynewValues:ArrayTypenewValues = ""
|
|
1985
|
+
countnewValues = len(newValues)
|
|
1986
|
+
ArrayTypenewValues = c_double * countnewValues
|
|
1987
|
+
arraynewValues = ArrayTypenewValues()
|
|
1988
|
+
for i in range(0, countnewValues):
|
|
1989
|
+
arraynewValues[i] = newValues[i]
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
GetDllLibXls().Workbook_ReplaceVD.argtypes=[c_void_p ,c_void_p,ArrayTypenewValues,c_int,c_bool]
|
|
1993
|
+
CallCFunction(GetDllLibXls().Workbook_ReplaceVD, self.Ptr, oldValue,arraynewValues,countnewValues,isVertical)
|
|
1994
|
+
|
|
1995
|
+
@dispatch
|
|
1996
|
+
|
|
1997
|
+
def Replace(self ,oldValue:str,newValues:List[int],isVertical:bool):
|
|
1998
|
+
"""
|
|
1999
|
+
<summary>
|
|
2000
|
+
Replaces cell's value from array.
|
|
2001
|
+
<example>The following code snippet illustrates how to replace the string with array of int values:
|
|
2002
|
+
<code>
|
|
2003
|
+
//Create workbook
|
|
2004
|
+
Workbook workbook = new Workbook();
|
|
2005
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
2006
|
+
//Replace the oldValue by array of int values
|
|
2007
|
+
string oldValue = "Find";
|
|
2008
|
+
int[] newValues = { 1, 2 };
|
|
2009
|
+
workbook.Replace(oldValue, newValues, true);
|
|
2010
|
+
//Save to file
|
|
2011
|
+
workbook.SaveToFile("Replace.xlsx");
|
|
2012
|
+
</code>
|
|
2013
|
+
</example>
|
|
2014
|
+
</summary>
|
|
2015
|
+
<param name="oldValue">Value to replace.</param>
|
|
2016
|
+
<param name="newValues">New values.</param>
|
|
2017
|
+
<param name="isVertical">Indicates whether new values should be inserted vertically.</param>
|
|
2018
|
+
"""
|
|
2019
|
+
#arraynewValues:ArrayTypenewValues = ""
|
|
2020
|
+
countnewValues = len(newValues)
|
|
2021
|
+
ArrayTypenewValues = c_int * countnewValues
|
|
2022
|
+
arraynewValues = ArrayTypenewValues()
|
|
2023
|
+
for i in range(0, countnewValues):
|
|
2024
|
+
arraynewValues[i] = newValues[i]
|
|
2025
|
+
|
|
2026
|
+
|
|
2027
|
+
GetDllLibXls().Workbook_ReplaceVI.argtypes=[c_void_p ,c_void_p,ArrayTypenewValues,c_int,c_bool]
|
|
2028
|
+
CallCFunction(GetDllLibXls().Workbook_ReplaceVI, self.Ptr, oldValue,arraynewValues,countnewValues,isVertical)
|
|
2029
|
+
|
|
2030
|
+
@dispatch
|
|
2031
|
+
|
|
2032
|
+
def Replace(self ,oldValue:str,newValue:str):
|
|
2033
|
+
"""
|
|
2034
|
+
<summary>
|
|
2035
|
+
Replaces cell's value by specified value.
|
|
2036
|
+
<example>The following code snippet illustrates how to replace the string with another string:
|
|
2037
|
+
<code>
|
|
2038
|
+
//Create workbook
|
|
2039
|
+
Workbook workbook = new Workbook();
|
|
2040
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
2041
|
+
//Replace the oldValue by newValue
|
|
2042
|
+
string oldValue = "Find";
|
|
2043
|
+
string newValue = "NewValue";
|
|
2044
|
+
workbook.Replace(oldValue, newValue);
|
|
2045
|
+
//Save to file
|
|
2046
|
+
workbook.SaveToFile("Replace.xlsx");
|
|
2047
|
+
</code>
|
|
2048
|
+
</example>
|
|
2049
|
+
</summary>
|
|
2050
|
+
<param name="oldValue">Value to replace.</param>
|
|
2051
|
+
<param name="newValue">New value</param>
|
|
2052
|
+
"""
|
|
2053
|
+
|
|
2054
|
+
GetDllLibXls().Workbook_ReplaceS.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
2055
|
+
CallCFunction(GetDllLibXls().Workbook_ReplaceS, self.Ptr, oldValue,newValue)
|
|
2056
|
+
|
|
2057
|
+
@dispatch
|
|
2058
|
+
|
|
2059
|
+
def Replace(self ,oldValue:str,newValues:List[str],isVertical:bool):
|
|
2060
|
+
"""
|
|
2061
|
+
<summary>
|
|
2062
|
+
Replaces cell's value from array.
|
|
2063
|
+
<example>The following code snippet illustrates how to replace the string with array of string values:
|
|
2064
|
+
<code>
|
|
2065
|
+
//Create workbook
|
|
2066
|
+
Workbook workbook = new Workbook();
|
|
2067
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
2068
|
+
//Replace the oldValue by array of string values
|
|
2069
|
+
string oldValue = "Find";
|
|
2070
|
+
string[] newValues = { "X values", "Y values" };
|
|
2071
|
+
workbook.Replace(oldValue, newValues , true);
|
|
2072
|
+
//Save to file
|
|
2073
|
+
workbook.SaveToFile("Replace.xlsx");
|
|
2074
|
+
</code>
|
|
2075
|
+
</example>
|
|
2076
|
+
</summary>
|
|
2077
|
+
<param name="oldValue">Value to replace.</param>
|
|
2078
|
+
<param name="newValues">New values.</param>
|
|
2079
|
+
<param name="isVertical">Indicates whether new values should be inserted vertically.</param>
|
|
2080
|
+
"""
|
|
2081
|
+
#arraynewValues:ArrayTypenewValues = ""
|
|
2082
|
+
countnewValues = len(newValues)
|
|
2083
|
+
ArrayTypenewValues = c_wchar_p * countnewValues
|
|
2084
|
+
arraynewValues = ArrayTypenewValues()
|
|
2085
|
+
for i in range(0, countnewValues):
|
|
2086
|
+
arraynewValues[i] = newValues[i]
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
GetDllLibXls().Workbook_ReplaceVS.argtypes=[c_void_p ,c_void_p,ArrayTypenewValues,c_int,c_bool]
|
|
2090
|
+
CallCFunction(GetDllLibXls().Workbook_ReplaceVS, self.Ptr, oldValue,arraynewValues,countnewValues,isVertical)
|
|
2091
|
+
|
|
2092
|
+
def ResetPalette(self):
|
|
2093
|
+
"""
|
|
2094
|
+
<summary>
|
|
2095
|
+
Resets the color palette to the default colors.
|
|
2096
|
+
<example>The following code snippets illustrates how to reset the palette:
|
|
2097
|
+
<code>
|
|
2098
|
+
//Create worksheet
|
|
2099
|
+
Workbook workbook = new Workbook();
|
|
2100
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
2101
|
+
//Get colors
|
|
2102
|
+
System.Drawing.Color[] colors = workbook.Colors;
|
|
2103
|
+
//Check color
|
|
2104
|
+
Console.WriteLine(colors[2].Name);
|
|
2105
|
+
//Set color
|
|
2106
|
+
colors[2] = System.Drawing.Color.Yellow;
|
|
2107
|
+
//Reset palette
|
|
2108
|
+
workbook.ResetPalette();
|
|
2109
|
+
//Check color
|
|
2110
|
+
Console.WriteLine(workbook.Colors[2].Name);
|
|
2111
|
+
//Save to file
|
|
2112
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
2113
|
+
</code>
|
|
2114
|
+
</example>
|
|
2115
|
+
</summary>
|
|
2116
|
+
"""
|
|
2117
|
+
GetDllLibXls().Workbook_ResetPalette.argtypes=[c_void_p]
|
|
2118
|
+
CallCFunction(GetDllLibXls().Workbook_ResetPalette, self.Ptr)
|
|
2119
|
+
|
|
2120
|
+
def Save(self):
|
|
2121
|
+
"""
|
|
2122
|
+
<summary>
|
|
2123
|
+
Saves changes to the specified workbook
|
|
2124
|
+
</summary>
|
|
2125
|
+
"""
|
|
2126
|
+
GetDllLibXls().Workbook_Save.argtypes=[c_void_p]
|
|
2127
|
+
CallCFunction(GetDllLibXls().Workbook_Save, self.Ptr)
|
|
2128
|
+
|
|
2129
|
+
@dispatch
|
|
2130
|
+
def SaveAsImage(self ,dpiX:float,dpiY:float)->List[Stream]:
|
|
2131
|
+
"""
|
|
2132
|
+
|
|
2133
|
+
"""
|
|
2134
|
+
|
|
2135
|
+
GetDllLibXls().Workbook_SaveAsImage.argtypes=[c_void_p ,c_float,c_float]
|
|
2136
|
+
GetDllLibXls().Workbook_SaveAsImage.restype=IntPtrArray
|
|
2137
|
+
intPtrArray = CallCFunction(GetDllLibXls().Workbook_SaveAsImage, self.Ptr, dpiX,dpiY)
|
|
2138
|
+
ret = GetObjVectorFromArray(intPtrArray, Stream)
|
|
2139
|
+
return ret
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
@property
|
|
2143
|
+
|
|
2144
|
+
def Worksheets(self)->'WorksheetsCollection':
|
|
2145
|
+
"""
|
|
2146
|
+
<summary>
|
|
2147
|
+
Returns a Sheets collection that represents all the worksheets in the specified workbook. Read-only Sheets object.
|
|
2148
|
+
</summary>
|
|
2149
|
+
"""
|
|
2150
|
+
GetDllLibXls().Workbook_get_Worksheets.argtypes=[c_void_p]
|
|
2151
|
+
GetDllLibXls().Workbook_get_Worksheets.restype=c_void_p
|
|
2152
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_Worksheets, self.Ptr)
|
|
2153
|
+
ret = None if intPtr==None else WorksheetsCollection(intPtr)
|
|
2154
|
+
return ret
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
@property
|
|
2158
|
+
|
|
2159
|
+
def NameRanges(self)->'INameRanges':
|
|
2160
|
+
"""
|
|
2161
|
+
<summary>
|
|
2162
|
+
Gets Names collection that represents all the names in the specified
|
|
2163
|
+
workbook.
|
|
2164
|
+
<example>The following code snippet illustrates how to get names:
|
|
2165
|
+
<code>
|
|
2166
|
+
//Create workbook
|
|
2167
|
+
Workbook workbook = new Workbook();
|
|
2168
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
2169
|
+
//Get names
|
|
2170
|
+
INameRanges names = workbook.NameRanges;
|
|
2171
|
+
</code>
|
|
2172
|
+
</example>
|
|
2173
|
+
</summary>
|
|
2174
|
+
"""
|
|
2175
|
+
GetDllLibXls().Workbook_get_NameRanges.argtypes=[c_void_p]
|
|
2176
|
+
GetDllLibXls().Workbook_get_NameRanges.restype=c_void_p
|
|
2177
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_NameRanges, self.Ptr)
|
|
2178
|
+
ret = None if intPtr==None else INameRanges(intPtr)
|
|
2179
|
+
return ret
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
@property
|
|
2183
|
+
def CheckComptiliblity(self)->bool:
|
|
2184
|
+
"""
|
|
2185
|
+
|
|
2186
|
+
"""
|
|
2187
|
+
GetDllLibXls().Workbook_get_CheckComptiliblity.argtypes=[c_void_p]
|
|
2188
|
+
GetDllLibXls().Workbook_get_CheckComptiliblity.restype=c_bool
|
|
2189
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_CheckComptiliblity, self.Ptr)
|
|
2190
|
+
return ret
|
|
2191
|
+
|
|
2192
|
+
@CheckComptiliblity.setter
|
|
2193
|
+
def CheckComptiliblity(self, value:bool):
|
|
2194
|
+
GetDllLibXls().Workbook_set_CheckComptiliblityB.argtypes=[c_void_p, c_bool]
|
|
2195
|
+
CallCFunction(GetDllLibXls().Workbook_set_CheckComptiliblityB, self.Ptr, value)
|
|
2196
|
+
|
|
2197
|
+
@property
|
|
2198
|
+
|
|
2199
|
+
def DataConns(self)->'DataConnections':
|
|
2200
|
+
"""
|
|
2201
|
+
|
|
2202
|
+
"""
|
|
2203
|
+
GetDllLibXls().Workbook_get_DataConns.argtypes=[c_void_p]
|
|
2204
|
+
GetDllLibXls().Workbook_get_DataConns.restype=c_void_p
|
|
2205
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_DataConns, self.Ptr)
|
|
2206
|
+
ret = None if intPtr==None else DataConnections(intPtr)
|
|
2207
|
+
return ret
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
@property
|
|
2211
|
+
|
|
2212
|
+
def CultureInfo(self)->'CultureInfo':
|
|
2213
|
+
"""
|
|
2214
|
+
|
|
2215
|
+
"""
|
|
2216
|
+
GetDllLibXls().Workbook_get_CultureInfo.argtypes=[c_void_p]
|
|
2217
|
+
GetDllLibXls().Workbook_get_CultureInfo.restype=c_void_p
|
|
2218
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_CultureInfo, self.Ptr)
|
|
2219
|
+
ret = None if intPtr==None else CultureInfo(intPtr)
|
|
2220
|
+
return ret
|
|
2221
|
+
|
|
2222
|
+
|
|
2223
|
+
@CultureInfo.setter
|
|
2224
|
+
def CultureInfo(self, value:'CultureInfo'):
|
|
2225
|
+
GetDllLibXls().Workbook_set_CultureInfo.argtypes=[c_void_p, c_void_p]
|
|
2226
|
+
CallCFunction(GetDllLibXls().Workbook_set_CultureInfo, self.Ptr, value.Ptr)
|
|
2227
|
+
|
|
2228
|
+
@property
|
|
2229
|
+
|
|
2230
|
+
def ExternalLinks(self)->'ExternalLinkCollection':
|
|
2231
|
+
"""
|
|
2232
|
+
|
|
2233
|
+
"""
|
|
2234
|
+
GetDllLibXls().Workbook_get_ExternalLinks.argtypes=[c_void_p]
|
|
2235
|
+
GetDllLibXls().Workbook_get_ExternalLinks.restype=c_void_p
|
|
2236
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_ExternalLinks, self.Ptr)
|
|
2237
|
+
ret = None if intPtr==None else ExternalLinkCollection(intPtr)
|
|
2238
|
+
return ret
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
@dispatch
|
|
2242
|
+
|
|
2243
|
+
def GetSafeSheetName(self ,inputName:str)->str:
|
|
2244
|
+
"""
|
|
2245
|
+
|
|
2246
|
+
"""
|
|
2247
|
+
|
|
2248
|
+
GetDllLibXls().Workbook_GetSafeSheetName.argtypes=[c_void_p ,c_void_p]
|
|
2249
|
+
GetDllLibXls().Workbook_GetSafeSheetName.restype=c_void_p
|
|
2250
|
+
ret = PtrToStr(CallCFunction(GetDllLibXls().Workbook_GetSafeSheetName, self.Ptr, inputName))
|
|
2251
|
+
return ret
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
@dispatch
|
|
2255
|
+
|
|
2256
|
+
def GetSafeSheetName(self ,inputName:str,replaceChar:int)->str:
|
|
2257
|
+
"""
|
|
2258
|
+
|
|
2259
|
+
"""
|
|
2260
|
+
|
|
2261
|
+
GetDllLibXls().Workbook_GetSafeSheetNameIR.argtypes=[c_void_p ,c_void_p,c_void_p]
|
|
2262
|
+
GetDllLibXls().Workbook_GetSafeSheetNameIR.restype=c_void_p
|
|
2263
|
+
ret = PtrToStr(CallCFunction(GetDllLibXls().Workbook_GetSafeSheetNameIR, self.Ptr, inputName,replaceChar))
|
|
2264
|
+
return ret
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
@property
|
|
2268
|
+
|
|
2269
|
+
def ActiveSheet(self)->'Worksheet':
|
|
2270
|
+
"""
|
|
2271
|
+
<summary>
|
|
2272
|
+
Returns an object that represents the active sheet (the sheet
|
|
2273
|
+
on top) in the active workbook or in the specified window or
|
|
2274
|
+
workbook. Returns Nothing if no sheet is active. Read-only.
|
|
2275
|
+
</summary>
|
|
2276
|
+
"""
|
|
2277
|
+
GetDllLibXls().Workbook_get_ActiveSheet.argtypes=[c_void_p]
|
|
2278
|
+
GetDllLibXls().Workbook_get_ActiveSheet.restype=c_void_p
|
|
2279
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_ActiveSheet, self.Ptr)
|
|
2280
|
+
ret = None if intPtr==None else Worksheet(intPtr)
|
|
2281
|
+
return ret
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
@property
|
|
2285
|
+
def Allow3DRangesInDataValidation(self)->bool:
|
|
2286
|
+
"""
|
|
2287
|
+
|
|
2288
|
+
"""
|
|
2289
|
+
GetDllLibXls().Workbook_get_Allow3DRangesInDataValidation.argtypes=[c_void_p]
|
|
2290
|
+
GetDllLibXls().Workbook_get_Allow3DRangesInDataValidation.restype=c_bool
|
|
2291
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_Allow3DRangesInDataValidation, self.Ptr)
|
|
2292
|
+
return ret
|
|
2293
|
+
|
|
2294
|
+
@Allow3DRangesInDataValidation.setter
|
|
2295
|
+
def Allow3DRangesInDataValidation(self, value:bool):
|
|
2296
|
+
GetDllLibXls().Workbook_set_Allow3DRangesInDataValidationV.argtypes=[c_void_p, c_bool]
|
|
2297
|
+
CallCFunction(GetDllLibXls().Workbook_set_Allow3DRangesInDataValidationV, self.Ptr, value)
|
|
2298
|
+
|
|
2299
|
+
@property
|
|
2300
|
+
def ActiveSheetIndex(self)->int:
|
|
2301
|
+
"""
|
|
2302
|
+
<summary>
|
|
2303
|
+
Gets or sets index of the active worksheet.
|
|
2304
|
+
</summary>
|
|
2305
|
+
"""
|
|
2306
|
+
GetDllLibXls().Workbook_get_ActiveSheetIndex.argtypes=[c_void_p]
|
|
2307
|
+
GetDllLibXls().Workbook_get_ActiveSheetIndex.restype=c_int
|
|
2308
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_ActiveSheetIndex, self.Ptr)
|
|
2309
|
+
return ret
|
|
2310
|
+
|
|
2311
|
+
@ActiveSheetIndex.setter
|
|
2312
|
+
def ActiveSheetIndex(self, value:int):
|
|
2313
|
+
GetDllLibXls().Workbook_set_ActiveSheetIndex.argtypes=[c_void_p, c_int]
|
|
2314
|
+
CallCFunction(GetDllLibXls().Workbook_set_ActiveSheetIndex, self.Ptr, value)
|
|
2315
|
+
|
|
2316
|
+
@property
|
|
2317
|
+
|
|
2318
|
+
def AddInFunctions(self)->'AddInFunctionsCollection':
|
|
2319
|
+
"""
|
|
2320
|
+
<summary>
|
|
2321
|
+
Returns collection of add-in functions.
|
|
2322
|
+
</summary>
|
|
2323
|
+
"""
|
|
2324
|
+
GetDllLibXls().Workbook_get_AddInFunctions.argtypes=[c_void_p]
|
|
2325
|
+
GetDllLibXls().Workbook_get_AddInFunctions.restype=c_void_p
|
|
2326
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_AddInFunctions, self.Ptr)
|
|
2327
|
+
ret = None if intPtr==None else AddInFunctionsCollection(intPtr)
|
|
2328
|
+
return ret
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
@property
|
|
2332
|
+
|
|
2333
|
+
def CalculationMode(self)->'ExcelCalculationMode':
|
|
2334
|
+
"""
|
|
2335
|
+
<summary>
|
|
2336
|
+
Get or set calculation mode.
|
|
2337
|
+
</summary>
|
|
2338
|
+
"""
|
|
2339
|
+
GetDllLibXls().Workbook_get_CalculationMode.argtypes=[c_void_p]
|
|
2340
|
+
GetDllLibXls().Workbook_get_CalculationMode.restype=c_int
|
|
2341
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_CalculationMode, self.Ptr)
|
|
2342
|
+
objwraped = ExcelCalculationMode(ret)
|
|
2343
|
+
return objwraped
|
|
2344
|
+
|
|
2345
|
+
@CalculationMode.setter
|
|
2346
|
+
def CalculationMode(self, value:'ExcelCalculationMode'):
|
|
2347
|
+
GetDllLibXls().Workbook_set_CalculationMode.argtypes=[c_void_p, c_int]
|
|
2348
|
+
CallCFunction(GetDllLibXls().Workbook_set_CalculationMode, self.Ptr, value.value)
|
|
2349
|
+
|
|
2350
|
+
@property
|
|
2351
|
+
|
|
2352
|
+
def DataSorter(self)->'DataSorter':
|
|
2353
|
+
"""
|
|
2354
|
+
<summary>
|
|
2355
|
+
Gets Data sorter to sort the data..
|
|
2356
|
+
</summary>
|
|
2357
|
+
"""
|
|
2358
|
+
GetDllLibXls().Workbook_get_DataSorter.argtypes=[c_void_p]
|
|
2359
|
+
GetDllLibXls().Workbook_get_DataSorter.restype=c_void_p
|
|
2360
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_DataSorter, self.Ptr)
|
|
2361
|
+
ret = None if intPtr==None else DataSorter(intPtr)
|
|
2362
|
+
return ret
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
@property
|
|
2366
|
+
def MaxColumnCount(self)->int:
|
|
2367
|
+
"""
|
|
2368
|
+
|
|
2369
|
+
"""
|
|
2370
|
+
GetDllLibXls().Workbook_get_MaxColumnCount.argtypes=[c_void_p]
|
|
2371
|
+
GetDllLibXls().Workbook_get_MaxColumnCount.restype=c_int
|
|
2372
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_MaxColumnCount, self.Ptr)
|
|
2373
|
+
return ret
|
|
2374
|
+
|
|
2375
|
+
@property
|
|
2376
|
+
def MaxRowCount(self)->int:
|
|
2377
|
+
"""
|
|
2378
|
+
|
|
2379
|
+
"""
|
|
2380
|
+
GetDllLibXls().Workbook_get_MaxRowCount.argtypes=[c_void_p]
|
|
2381
|
+
GetDllLibXls().Workbook_get_MaxRowCount.restype=c_int
|
|
2382
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_MaxRowCount, self.Ptr)
|
|
2383
|
+
return ret
|
|
2384
|
+
|
|
2385
|
+
@property
|
|
2386
|
+
|
|
2387
|
+
def CodeName(self)->str:
|
|
2388
|
+
"""
|
|
2389
|
+
<summary>
|
|
2390
|
+
Name which used by macros to access to workbook items.
|
|
2391
|
+
</summary>
|
|
2392
|
+
"""
|
|
2393
|
+
GetDllLibXls().Workbook_get_CodeName.argtypes=[c_void_p]
|
|
2394
|
+
GetDllLibXls().Workbook_get_CodeName.restype=c_void_p
|
|
2395
|
+
ret = PtrToStr(CallCFunction(GetDllLibXls().Workbook_get_CodeName, self.Ptr))
|
|
2396
|
+
return ret
|
|
2397
|
+
|
|
2398
|
+
|
|
2399
|
+
@CodeName.setter
|
|
2400
|
+
def CodeName(self, value:str):
|
|
2401
|
+
GetDllLibXls().Workbook_set_CodeName.argtypes=[c_void_p, c_wchar_p]
|
|
2402
|
+
CallCFunction(GetDllLibXls().Workbook_set_CodeName, self.Ptr, value)
|
|
2403
|
+
|
|
2404
|
+
@property
|
|
2405
|
+
|
|
2406
|
+
def Colors(self)->List['Color']:
|
|
2407
|
+
"""
|
|
2408
|
+
<summary>
|
|
2409
|
+
Returns colors in the palette for the workbook. The palette has 56 entries, each represented by an RGB value. Read/write Object.
|
|
2410
|
+
<example>The following code illustrates how to access the default colors of excel color palette:
|
|
2411
|
+
<code>
|
|
2412
|
+
//Create worksheet
|
|
2413
|
+
Workbook workbook = new Workbook();
|
|
2414
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
2415
|
+
//Get colors
|
|
2416
|
+
System.Drawing.Color[] colors = workbook.Colors;
|
|
2417
|
+
//Get color
|
|
2418
|
+
System.Drawing.Color color = colors[2];
|
|
2419
|
+
//Set color
|
|
2420
|
+
worksheet["B2"].Style.Color = color;
|
|
2421
|
+
//Save to file
|
|
2422
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
2423
|
+
</code>
|
|
2424
|
+
</example>
|
|
2425
|
+
</summary>
|
|
2426
|
+
"""
|
|
2427
|
+
GetDllLibXls().Workbook_get_Colors.argtypes=[c_void_p]
|
|
2428
|
+
GetDllLibXls().Workbook_get_Colors.restype=IntPtrArray
|
|
2429
|
+
intPtrArray = CallCFunction(GetDllLibXls().Workbook_get_Colors, self.Ptr)
|
|
2430
|
+
ret = GetVectorFromArray(intPtrArray, Color)
|
|
2431
|
+
return ret
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
@property
|
|
2435
|
+
|
|
2436
|
+
def ConverterSetting(self)->'ConverterSetting':
|
|
2437
|
+
"""
|
|
2438
|
+
|
|
2439
|
+
"""
|
|
2440
|
+
GetDllLibXls().Workbook_get_ConverterSetting.argtypes=[c_void_p]
|
|
2441
|
+
GetDllLibXls().Workbook_get_ConverterSetting.restype=c_void_p
|
|
2442
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_ConverterSetting, self.Ptr)
|
|
2443
|
+
ret = None if intPtr==None else ConverterSetting(intPtr)
|
|
2444
|
+
return ret
|
|
2445
|
+
|
|
2446
|
+
|
|
2447
|
+
@ConverterSetting.setter
|
|
2448
|
+
def ConverterSetting(self, value:'ConverterSetting'):
|
|
2449
|
+
GetDllLibXls().Workbook_set_ConverterSetting.argtypes=[c_void_p, c_void_p]
|
|
2450
|
+
CallCFunction(GetDllLibXls().Workbook_set_ConverterSetting, self.Ptr, value.Ptr)
|
|
2451
|
+
|
|
2452
|
+
@property
|
|
2453
|
+
def Date1904(self)->bool:
|
|
2454
|
+
"""
|
|
2455
|
+
<summary>
|
|
2456
|
+
True if the workbook uses the 1904 date system. Read/write Boolean.
|
|
2457
|
+
</summary>
|
|
2458
|
+
"""
|
|
2459
|
+
GetDllLibXls().Workbook_get_Date1904.argtypes=[c_void_p]
|
|
2460
|
+
GetDllLibXls().Workbook_get_Date1904.restype=c_bool
|
|
2461
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_Date1904, self.Ptr)
|
|
2462
|
+
return ret
|
|
2463
|
+
|
|
2464
|
+
@Date1904.setter
|
|
2465
|
+
def Date1904(self, value:bool):
|
|
2466
|
+
GetDllLibXls().Workbook_set_Date1904.argtypes=[c_void_p, c_bool]
|
|
2467
|
+
CallCFunction(GetDllLibXls().Workbook_set_Date1904, self.Ptr, value)
|
|
2468
|
+
|
|
2469
|
+
@property
|
|
2470
|
+
def MaxRowsOfSharedFormula(self)->int:
|
|
2471
|
+
"""
|
|
2472
|
+
|
|
2473
|
+
"""
|
|
2474
|
+
GetDllLibXls().Workbook_get_MaxRowsOfSharedFormula.argtypes=[c_void_p]
|
|
2475
|
+
GetDllLibXls().Workbook_get_MaxRowsOfSharedFormula.restype=c_int
|
|
2476
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_MaxRowsOfSharedFormula, self.Ptr)
|
|
2477
|
+
return ret
|
|
2478
|
+
|
|
2479
|
+
@MaxRowsOfSharedFormula.setter
|
|
2480
|
+
def MaxRowsOfSharedFormula(self, value:int):
|
|
2481
|
+
GetDllLibXls().Workbook_set_MaxRowsOfSharedFormula.argtypes=[c_void_p, c_int]
|
|
2482
|
+
CallCFunction(GetDllLibXls().Workbook_set_MaxRowsOfSharedFormula, self.Ptr, value)
|
|
2483
|
+
|
|
2484
|
+
@property
|
|
2485
|
+
|
|
2486
|
+
def DefaultFontName(self)->str:
|
|
2487
|
+
"""
|
|
2488
|
+
<summary>
|
|
2489
|
+
Returns or sets the name of the default font.
|
|
2490
|
+
<example>The following code illustrates how to set the standard font for the workbook:
|
|
2491
|
+
<code>
|
|
2492
|
+
//Create worksheet
|
|
2493
|
+
Workbook workbook = new Workbook();
|
|
2494
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
2495
|
+
//Set text
|
|
2496
|
+
worksheet["B2"].Text = "Text";
|
|
2497
|
+
//Set standard font
|
|
2498
|
+
workbook.DefaultFontName = "Arial";
|
|
2499
|
+
//Set standard font size
|
|
2500
|
+
workbook.DefaultFontSize = 18;
|
|
2501
|
+
//Save to file
|
|
2502
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
2503
|
+
</code>
|
|
2504
|
+
</example>
|
|
2505
|
+
</summary>
|
|
2506
|
+
"""
|
|
2507
|
+
GetDllLibXls().Workbook_get_DefaultFontName.argtypes=[c_void_p]
|
|
2508
|
+
GetDllLibXls().Workbook_get_DefaultFontName.restype=c_void_p
|
|
2509
|
+
ret = PtrToStr(CallCFunction(GetDllLibXls().Workbook_get_DefaultFontName, self.Ptr))
|
|
2510
|
+
return ret
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
@DefaultFontName.setter
|
|
2514
|
+
def DefaultFontName(self, value:str):
|
|
2515
|
+
GetDllLibXls().Workbook_set_DefaultFontName.argtypes=[c_void_p, c_wchar_p]
|
|
2516
|
+
CallCFunction(GetDllLibXls().Workbook_set_DefaultFontName, self.Ptr, value)
|
|
2517
|
+
|
|
2518
|
+
@property
|
|
2519
|
+
def DefaultFontSize(self)->float:
|
|
2520
|
+
"""
|
|
2521
|
+
<summary>
|
|
2522
|
+
Returns or sets the default font size.
|
|
2523
|
+
<example>The following code illustrates how to set the standard font size for the workbook:
|
|
2524
|
+
<code>
|
|
2525
|
+
//Create worksheet
|
|
2526
|
+
Workbook workbook = new Workbook();
|
|
2527
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
2528
|
+
//Set text
|
|
2529
|
+
worksheet["B2"].Text = "Text";
|
|
2530
|
+
//Set standard font
|
|
2531
|
+
workbook.DefaultFontName = "Arial";
|
|
2532
|
+
//Set standard font size
|
|
2533
|
+
workbook.DefaultFontSize = 18;
|
|
2534
|
+
//Save to file
|
|
2535
|
+
workbook.SaveToFile("CellFormats.xlsx");
|
|
2536
|
+
</code>
|
|
2537
|
+
</example>
|
|
2538
|
+
</summary>
|
|
2539
|
+
"""
|
|
2540
|
+
GetDllLibXls().Workbook_get_DefaultFontSize.argtypes=[c_void_p]
|
|
2541
|
+
GetDllLibXls().Workbook_get_DefaultFontSize.restype=c_double
|
|
2542
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_DefaultFontSize, self.Ptr)
|
|
2543
|
+
return ret
|
|
2544
|
+
|
|
2545
|
+
@DefaultFontSize.setter
|
|
2546
|
+
def DefaultFontSize(self, value:float):
|
|
2547
|
+
GetDllLibXls().Workbook_set_DefaultFontSize.argtypes=[c_void_p, c_double]
|
|
2548
|
+
CallCFunction(GetDllLibXls().Workbook_set_DefaultFontSize, self.Ptr, value)
|
|
2549
|
+
|
|
2550
|
+
@property
|
|
2551
|
+
|
|
2552
|
+
def CustomFontFilePaths(self)->List[str]:
|
|
2553
|
+
"""
|
|
2554
|
+
<summary>
|
|
2555
|
+
Returns or sets the custom path of font files.
|
|
2556
|
+
</summary>
|
|
2557
|
+
"""
|
|
2558
|
+
GetDllLibXls().Workbook_get_CustomFontFilePaths.argtypes=[c_void_p]
|
|
2559
|
+
GetDllLibXls().Workbook_get_CustomFontFilePaths.restype=IntPtrArray
|
|
2560
|
+
intPtrArray = CallCFunction(GetDllLibXls().Workbook_get_CustomFontFilePaths, self.Ptr)
|
|
2561
|
+
ret = GetStrVectorFromArray(intPtrArray, c_void_p)
|
|
2562
|
+
return ret
|
|
2563
|
+
|
|
2564
|
+
@CustomFontFilePaths.setter
|
|
2565
|
+
def CustomFontFilePaths(self, value:List[str]):
|
|
2566
|
+
vCount = len(value)
|
|
2567
|
+
ArrayType = c_wchar_p * vCount
|
|
2568
|
+
vArray = ArrayType()
|
|
2569
|
+
for i in range(0, vCount):
|
|
2570
|
+
vArray[i] = value[i]
|
|
2571
|
+
GetDllLibXls().Workbook_set_CustomFontFilePaths.argtypes=[c_void_p, ArrayType, c_int]
|
|
2572
|
+
CallCFunction(GetDllLibXls().Workbook_set_CustomFontFilePaths, self.Ptr, vArray, vCount)
|
|
2573
|
+
|
|
2574
|
+
#
|
|
2575
|
+
# def GetCustomFontParsedResult(self)->'Hashtable':
|
|
2576
|
+
# """
|
|
2577
|
+
# <summary>
|
|
2578
|
+
# Get result that parse the custom path of font files
|
|
2579
|
+
# </summary>
|
|
2580
|
+
# """
|
|
2581
|
+
# GetDllLibXls().Workbook_GetCustomFontParsedResult.argtypes=[c_void_p]
|
|
2582
|
+
# GetDllLibXls().Workbook_GetCustomFontParsedResult.restype=c_void_p
|
|
2583
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_GetCustomFontParsedResult, self.Ptr)
|
|
2584
|
+
# ret = None if intPtr==None else Hashtable(intPtr)
|
|
2585
|
+
# return ret
|
|
2586
|
+
#
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
@property
|
|
2590
|
+
|
|
2591
|
+
def CustomFontFileDirectory(self)->List[str]:
|
|
2592
|
+
"""
|
|
2593
|
+
<summary>
|
|
2594
|
+
Sets the custom directory of font files.
|
|
2595
|
+
</summary>
|
|
2596
|
+
"""
|
|
2597
|
+
GetDllLibXls().Workbook_get_CustomFontFileDirectory.argtypes=[c_void_p]
|
|
2598
|
+
GetDllLibXls().Workbook_get_CustomFontFileDirectory.restype=IntPtrArray
|
|
2599
|
+
intPtrArray = CallCFunction(GetDllLibXls().Workbook_get_CustomFontFileDirectory, self.Ptr)
|
|
2600
|
+
ret = GetStrVectorFromArray(intPtrArray, c_void_p)
|
|
2601
|
+
return ret
|
|
2602
|
+
|
|
2603
|
+
@CustomFontFileDirectory.setter
|
|
2604
|
+
def CustomFontFileDirectory(self, value:List[str]):
|
|
2605
|
+
vCount = len(value)
|
|
2606
|
+
ArrayType = c_wchar_p * vCount
|
|
2607
|
+
vArray = ArrayType()
|
|
2608
|
+
for i in range(0, vCount):
|
|
2609
|
+
vArray[i] = value[i]
|
|
2610
|
+
GetDllLibXls().Workbook_set_CustomFontFileDirectory.argtypes=[c_void_p, ArrayType, c_int]
|
|
2611
|
+
CallCFunction(GetDllLibXls().Workbook_set_CustomFontFileDirectory, self.Ptr, vArray, vCount)
|
|
2612
|
+
|
|
2613
|
+
@property
|
|
2614
|
+
def DisableMacrosStart(self)->bool:
|
|
2615
|
+
"""
|
|
2616
|
+
<summary>
|
|
2617
|
+
Allows users to disable load of macros from document.
|
|
2618
|
+
</summary>
|
|
2619
|
+
"""
|
|
2620
|
+
GetDllLibXls().Workbook_get_DisableMacrosStart.argtypes=[c_void_p]
|
|
2621
|
+
GetDllLibXls().Workbook_get_DisableMacrosStart.restype=c_bool
|
|
2622
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_DisableMacrosStart, self.Ptr)
|
|
2623
|
+
return ret
|
|
2624
|
+
|
|
2625
|
+
@DisableMacrosStart.setter
|
|
2626
|
+
def DisableMacrosStart(self, value:bool):
|
|
2627
|
+
GetDllLibXls().Workbook_set_DisableMacrosStart.argtypes=[c_void_p, c_bool]
|
|
2628
|
+
CallCFunction(GetDllLibXls().Workbook_set_DisableMacrosStart, self.Ptr, value)
|
|
2629
|
+
|
|
2630
|
+
@property
|
|
2631
|
+
|
|
2632
|
+
def FileName(self)->str:
|
|
2633
|
+
"""
|
|
2634
|
+
<summary>
|
|
2635
|
+
Gets file name.
|
|
2636
|
+
</summary>
|
|
2637
|
+
"""
|
|
2638
|
+
GetDllLibXls().Workbook_get_FileName.argtypes=[c_void_p]
|
|
2639
|
+
GetDllLibXls().Workbook_get_FileName.restype=c_void_p
|
|
2640
|
+
ret = PtrToStr(CallCFunction(GetDllLibXls().Workbook_get_FileName, self.Ptr))
|
|
2641
|
+
return ret
|
|
2642
|
+
|
|
2643
|
+
|
|
2644
|
+
@property
|
|
2645
|
+
def HasMacros(self)->bool:
|
|
2646
|
+
"""
|
|
2647
|
+
<summary>
|
|
2648
|
+
Indicates whether contains VBA macros.
|
|
2649
|
+
</summary>
|
|
2650
|
+
"""
|
|
2651
|
+
GetDllLibXls().Workbook_get_HasMacros.argtypes=[c_void_p]
|
|
2652
|
+
GetDllLibXls().Workbook_get_HasMacros.restype=c_bool
|
|
2653
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_HasMacros, self.Ptr)
|
|
2654
|
+
return ret
|
|
2655
|
+
|
|
2656
|
+
@HasMacros.setter
|
|
2657
|
+
def HasMacros(self, value:bool):
|
|
2658
|
+
GetDllLibXls().Workbook_set_HasMacros.argtypes=[c_void_p, c_bool]
|
|
2659
|
+
CallCFunction(GetDllLibXls().Workbook_set_HasMacros, self.Ptr, value)
|
|
2660
|
+
|
|
2661
|
+
@property
|
|
2662
|
+
def IsCellProtection(self)->bool:
|
|
2663
|
+
"""
|
|
2664
|
+
<summary>
|
|
2665
|
+
Indicates whether cells are protected.
|
|
2666
|
+
</summary>
|
|
2667
|
+
"""
|
|
2668
|
+
GetDllLibXls().Workbook_get_IsCellProtection.argtypes=[c_void_p]
|
|
2669
|
+
GetDllLibXls().Workbook_get_IsCellProtection.restype=c_bool
|
|
2670
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsCellProtection, self.Ptr)
|
|
2671
|
+
return ret
|
|
2672
|
+
|
|
2673
|
+
@property
|
|
2674
|
+
def IsRightToLeft(self)->bool:
|
|
2675
|
+
"""
|
|
2676
|
+
<summary>
|
|
2677
|
+
Indicates whether worksheet is displayed right to left.
|
|
2678
|
+
</summary>
|
|
2679
|
+
"""
|
|
2680
|
+
GetDllLibXls().Workbook_get_IsRightToLeft.argtypes=[c_void_p]
|
|
2681
|
+
GetDllLibXls().Workbook_get_IsRightToLeft.restype=c_bool
|
|
2682
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsRightToLeft, self.Ptr)
|
|
2683
|
+
return ret
|
|
2684
|
+
|
|
2685
|
+
@IsRightToLeft.setter
|
|
2686
|
+
def IsRightToLeft(self, value:bool):
|
|
2687
|
+
GetDllLibXls().Workbook_set_IsRightToLeft.argtypes=[c_void_p, c_bool]
|
|
2688
|
+
CallCFunction(GetDllLibXls().Workbook_set_IsRightToLeft, self.Ptr, value)
|
|
2689
|
+
|
|
2690
|
+
@property
|
|
2691
|
+
def IsSaved(self)->bool:
|
|
2692
|
+
"""
|
|
2693
|
+
<summary>
|
|
2694
|
+
Indicates whether workbook changes have been saved.
|
|
2695
|
+
</summary>
|
|
2696
|
+
"""
|
|
2697
|
+
GetDllLibXls().Workbook_get_IsSaved.argtypes=[c_void_p]
|
|
2698
|
+
GetDllLibXls().Workbook_get_IsSaved.restype=c_bool
|
|
2699
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsSaved, self.Ptr)
|
|
2700
|
+
return ret
|
|
2701
|
+
|
|
2702
|
+
@IsSaved.setter
|
|
2703
|
+
def IsSaved(self, value:bool):
|
|
2704
|
+
GetDllLibXls().Workbook_set_IsSaved.argtypes=[c_void_p, c_bool]
|
|
2705
|
+
CallCFunction(GetDllLibXls().Workbook_set_IsSaved, self.Ptr, value)
|
|
2706
|
+
|
|
2707
|
+
@property
|
|
2708
|
+
def IsWindowProtection(self)->bool:
|
|
2709
|
+
"""
|
|
2710
|
+
<summary>
|
|
2711
|
+
Indicates window is protected.
|
|
2712
|
+
</summary>
|
|
2713
|
+
"""
|
|
2714
|
+
GetDllLibXls().Workbook_get_IsWindowProtection.argtypes=[c_void_p]
|
|
2715
|
+
GetDllLibXls().Workbook_get_IsWindowProtection.restype=c_bool
|
|
2716
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsWindowProtection, self.Ptr)
|
|
2717
|
+
return ret
|
|
2718
|
+
|
|
2719
|
+
@property
|
|
2720
|
+
|
|
2721
|
+
def MarkerDesigner(self)->'MarkerDesigner':
|
|
2722
|
+
"""
|
|
2723
|
+
|
|
2724
|
+
"""
|
|
2725
|
+
GetDllLibXls().Workbook_get_MarkerDesigner.argtypes=[c_void_p]
|
|
2726
|
+
GetDllLibXls().Workbook_get_MarkerDesigner.restype=c_void_p
|
|
2727
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_MarkerDesigner, self.Ptr)
|
|
2728
|
+
ret = None if intPtr==None else MarkerDesigner(intPtr)
|
|
2729
|
+
return ret
|
|
2730
|
+
|
|
2731
|
+
|
|
2732
|
+
@property
|
|
2733
|
+
def MaxDigitWidth(self)->int:
|
|
2734
|
+
"""
|
|
2735
|
+
|
|
2736
|
+
"""
|
|
2737
|
+
GetDllLibXls().Workbook_get_MaxDigitWidth.argtypes=[c_void_p]
|
|
2738
|
+
GetDllLibXls().Workbook_get_MaxDigitWidth.restype=c_int
|
|
2739
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_MaxDigitWidth, self.Ptr)
|
|
2740
|
+
return ret
|
|
2741
|
+
|
|
2742
|
+
@property
|
|
2743
|
+
|
|
2744
|
+
def OpenPassword(self)->str:
|
|
2745
|
+
"""
|
|
2746
|
+
<summary>
|
|
2747
|
+
Returns or sets password to encrypt document.
|
|
2748
|
+
</summary>
|
|
2749
|
+
"""
|
|
2750
|
+
GetDllLibXls().Workbook_get_OpenPassword.argtypes=[c_void_p]
|
|
2751
|
+
GetDllLibXls().Workbook_get_OpenPassword.restype=c_void_p
|
|
2752
|
+
ret = PtrToStr(CallCFunction(GetDllLibXls().Workbook_get_OpenPassword, self.Ptr))
|
|
2753
|
+
return ret
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
@OpenPassword.setter
|
|
2757
|
+
def OpenPassword(self, value:str):
|
|
2758
|
+
GetDllLibXls().Workbook_set_OpenPassword.argtypes=[c_void_p, c_wchar_p]
|
|
2759
|
+
CallCFunction(GetDllLibXls().Workbook_set_OpenPassword, self.Ptr, value)
|
|
2760
|
+
|
|
2761
|
+
@property
|
|
2762
|
+
|
|
2763
|
+
def WriteProtection(self)->'WriteProtection':
|
|
2764
|
+
"""
|
|
2765
|
+
<summary>
|
|
2766
|
+
Returns options of the workbook write protection.
|
|
2767
|
+
</summary>
|
|
2768
|
+
"""
|
|
2769
|
+
GetDllLibXls().Workbook_get_WriteProtection.argtypes=[c_void_p]
|
|
2770
|
+
GetDllLibXls().Workbook_get_WriteProtection.restype=c_void_p
|
|
2771
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_WriteProtection, self.Ptr)
|
|
2772
|
+
ret = None if intPtr==None else WriteProtection(intPtr)
|
|
2773
|
+
return ret
|
|
2774
|
+
|
|
2775
|
+
|
|
2776
|
+
@property
|
|
2777
|
+
def IsVScrollBarVisible(self)->bool:
|
|
2778
|
+
"""
|
|
2779
|
+
<summary>
|
|
2780
|
+
Returns or sets whether show vertical scroll bar.
|
|
2781
|
+
<example>This sample shows how to hide vertical scroll bar:
|
|
2782
|
+
<code>
|
|
2783
|
+
//Create workbook
|
|
2784
|
+
Workbook workbook = new Workbook();
|
|
2785
|
+
//Hide vertical scroll bar
|
|
2786
|
+
workbook.IsVScrollBarVisible = false;
|
|
2787
|
+
//Save to file
|
|
2788
|
+
workbook.SaveToFile("IsVScrollBarVisible.xlsx");
|
|
2789
|
+
</code>
|
|
2790
|
+
</example>
|
|
2791
|
+
</summary>
|
|
2792
|
+
"""
|
|
2793
|
+
GetDllLibXls().Workbook_get_IsVScrollBarVisible.argtypes=[c_void_p]
|
|
2794
|
+
GetDllLibXls().Workbook_get_IsVScrollBarVisible.restype=c_bool
|
|
2795
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsVScrollBarVisible, self.Ptr)
|
|
2796
|
+
return ret
|
|
2797
|
+
|
|
2798
|
+
@IsVScrollBarVisible.setter
|
|
2799
|
+
def IsVScrollBarVisible(self, value:bool):
|
|
2800
|
+
GetDllLibXls().Workbook_set_IsVScrollBarVisible.argtypes=[c_void_p, c_bool]
|
|
2801
|
+
CallCFunction(GetDllLibXls().Workbook_set_IsVScrollBarVisible, self.Ptr, value)
|
|
2802
|
+
|
|
2803
|
+
@property
|
|
2804
|
+
def IsHScrollBarVisible(self)->bool:
|
|
2805
|
+
"""
|
|
2806
|
+
<summary>
|
|
2807
|
+
Returns or sets whether show horizontal scroll bar.
|
|
2808
|
+
<example>This sample shows how to hide horizontal scroll bar:
|
|
2809
|
+
<code>
|
|
2810
|
+
//Create workbook
|
|
2811
|
+
Workbook workbook = new Workbook();
|
|
2812
|
+
//Hide horizontal scroll bar
|
|
2813
|
+
workbook.IsHScrollBarVisible = false;
|
|
2814
|
+
//Save to file
|
|
2815
|
+
workbook.SaveToFile("IsHScrollBarVisible.xlsx");
|
|
2816
|
+
</code>
|
|
2817
|
+
</example>
|
|
2818
|
+
</summary>
|
|
2819
|
+
"""
|
|
2820
|
+
GetDllLibXls().Workbook_get_IsHScrollBarVisible.argtypes=[c_void_p]
|
|
2821
|
+
GetDllLibXls().Workbook_get_IsHScrollBarVisible.restype=c_bool
|
|
2822
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsHScrollBarVisible, self.Ptr)
|
|
2823
|
+
return ret
|
|
2824
|
+
|
|
2825
|
+
@IsHScrollBarVisible.setter
|
|
2826
|
+
def IsHScrollBarVisible(self, value:bool):
|
|
2827
|
+
GetDllLibXls().Workbook_set_IsHScrollBarVisible.argtypes=[c_void_p, c_bool]
|
|
2828
|
+
CallCFunction(GetDllLibXls().Workbook_set_IsHScrollBarVisible, self.Ptr, value)
|
|
2829
|
+
|
|
2830
|
+
@property
|
|
2831
|
+
def SheetTabBarWidth(self)->int:
|
|
2832
|
+
"""
|
|
2833
|
+
<summary>
|
|
2834
|
+
Returns or sets the width of worksheet tab bar. 1/1000 of window width.
|
|
2835
|
+
</summary>
|
|
2836
|
+
"""
|
|
2837
|
+
GetDllLibXls().Workbook_get_SheetTabBarWidth.argtypes=[c_void_p]
|
|
2838
|
+
GetDllLibXls().Workbook_get_SheetTabBarWidth.restype=c_int
|
|
2839
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_SheetTabBarWidth, self.Ptr)
|
|
2840
|
+
return ret
|
|
2841
|
+
|
|
2842
|
+
@SheetTabBarWidth.setter
|
|
2843
|
+
def SheetTabBarWidth(self, value:int):
|
|
2844
|
+
GetDllLibXls().Workbook_set_SheetTabBarWidth.argtypes=[c_void_p, c_int]
|
|
2845
|
+
CallCFunction(GetDllLibXls().Workbook_set_SheetTabBarWidth, self.Ptr, value)
|
|
2846
|
+
|
|
2847
|
+
@property
|
|
2848
|
+
def OptimizeImport(self)->bool:
|
|
2849
|
+
"""
|
|
2850
|
+
<summary>
|
|
2851
|
+
Indicates whether to optimize Import data. This option will
|
|
2852
|
+
take effect only on Import methods that are available with the worksheet
|
|
2853
|
+
WARNING: Setting this property to True can decrease memory significantly,
|
|
2854
|
+
but will increase the performance of data import .
|
|
2855
|
+
</summary>
|
|
2856
|
+
"""
|
|
2857
|
+
GetDllLibXls().Workbook_get_OptimizeImport.argtypes=[c_void_p]
|
|
2858
|
+
GetDllLibXls().Workbook_get_OptimizeImport.restype=c_bool
|
|
2859
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_OptimizeImport, self.Ptr)
|
|
2860
|
+
return ret
|
|
2861
|
+
|
|
2862
|
+
@OptimizeImport.setter
|
|
2863
|
+
def OptimizeImport(self, value:bool):
|
|
2864
|
+
GetDllLibXls().Workbook_set_OptimizeImport.argtypes=[c_void_p, c_bool]
|
|
2865
|
+
CallCFunction(GetDllLibXls().Workbook_set_OptimizeImport, self.Ptr, value)
|
|
2866
|
+
|
|
2867
|
+
@property
|
|
2868
|
+
|
|
2869
|
+
def PivotCaches(self)->'PivotCachesCollection':
|
|
2870
|
+
"""
|
|
2871
|
+
<summary>
|
|
2872
|
+
Returns pivot caches collection. Read-only.
|
|
2873
|
+
<example>The following code snippet illustrates how to get pivot caches:
|
|
2874
|
+
<code>
|
|
2875
|
+
//Create worksheet
|
|
2876
|
+
Workbook workbook = new Workbook();
|
|
2877
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
2878
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
2879
|
+
//Gets pivot caches collection
|
|
2880
|
+
IPivotCaches pivotCaches = workbook.PivotCaches;
|
|
2881
|
+
</code>
|
|
2882
|
+
</example>
|
|
2883
|
+
</summary>
|
|
2884
|
+
"""
|
|
2885
|
+
GetDllLibXls().Workbook_get_PivotCaches.argtypes=[c_void_p]
|
|
2886
|
+
GetDllLibXls().Workbook_get_PivotCaches.restype=c_void_p
|
|
2887
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_PivotCaches, self.Ptr)
|
|
2888
|
+
ret = None if intPtr==None else PivotCachesCollection(intPtr)
|
|
2889
|
+
return ret
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
# @PrintDialog.setter
|
|
2893
|
+
# def PrintDialog(self, value:'PrintDialog'):
|
|
2894
|
+
# GetDllLibXls().Workbook_set_PrintDialog.argtypes=[c_void_p, c_void_p]
|
|
2895
|
+
# CallCFunction(GetDllLibXls().Workbook_set_PrintDialog, self.Ptr, value.Ptr)
|
|
2896
|
+
|
|
2897
|
+
|
|
2898
|
+
# @property
|
|
2899
|
+
#
|
|
2900
|
+
# def PrintDocument(self)->'PrintDocument':
|
|
2901
|
+
# """
|
|
2902
|
+
# <summary>
|
|
2903
|
+
# Gets the PrintDocument
|
|
2904
|
+
# </summary>
|
|
2905
|
+
# """
|
|
2906
|
+
# GetDllLibXls().Workbook_get_PrintDocument.argtypes=[c_void_p]
|
|
2907
|
+
# GetDllLibXls().Workbook_get_PrintDocument.restype=c_void_p
|
|
2908
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_get_PrintDocument, self.Ptr)
|
|
2909
|
+
# ret = None if intPtr==None else PrintDocument(intPtr)
|
|
2910
|
+
# return ret
|
|
2911
|
+
#
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
@property
|
|
2915
|
+
def ReadOnly(self)->bool:
|
|
2916
|
+
"""
|
|
2917
|
+
<summary>
|
|
2918
|
+
Indicates whether the workbook has been opened as Read-only.
|
|
2919
|
+
</summary>
|
|
2920
|
+
"""
|
|
2921
|
+
GetDllLibXls().Workbook_get_ReadOnly.argtypes=[c_void_p]
|
|
2922
|
+
GetDllLibXls().Workbook_get_ReadOnly.restype=c_bool
|
|
2923
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_ReadOnly, self.Ptr)
|
|
2924
|
+
return ret
|
|
2925
|
+
|
|
2926
|
+
@property
|
|
2927
|
+
def SelectedTab(self)->int:
|
|
2928
|
+
"""
|
|
2929
|
+
<summary>
|
|
2930
|
+
Gets or sets tab index of selected.
|
|
2931
|
+
</summary>
|
|
2932
|
+
"""
|
|
2933
|
+
GetDllLibXls().Workbook_get_SelectedTab.argtypes=[c_void_p]
|
|
2934
|
+
GetDllLibXls().Workbook_get_SelectedTab.restype=c_int
|
|
2935
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_SelectedTab, self.Ptr)
|
|
2936
|
+
return ret
|
|
2937
|
+
|
|
2938
|
+
@SelectedTab.setter
|
|
2939
|
+
def SelectedTab(self, value:int):
|
|
2940
|
+
GetDllLibXls().Workbook_set_SelectedTab.argtypes=[c_void_p, c_int]
|
|
2941
|
+
CallCFunction(GetDllLibXls().Workbook_set_SelectedTab, self.Ptr, value)
|
|
2942
|
+
|
|
2943
|
+
@property
|
|
2944
|
+
def ShowTabs(self)->bool:
|
|
2945
|
+
"""
|
|
2946
|
+
<summary>
|
|
2947
|
+
Get or sets a value whether the Workbook tabs are displayed.
|
|
2948
|
+
</summary>
|
|
2949
|
+
"""
|
|
2950
|
+
GetDllLibXls().Workbook_get_ShowTabs.argtypes=[c_void_p]
|
|
2951
|
+
GetDllLibXls().Workbook_get_ShowTabs.restype=c_bool
|
|
2952
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_ShowTabs, self.Ptr)
|
|
2953
|
+
return ret
|
|
2954
|
+
|
|
2955
|
+
@ShowTabs.setter
|
|
2956
|
+
def ShowTabs(self, value:bool):
|
|
2957
|
+
GetDllLibXls().Workbook_set_ShowTabs.argtypes=[c_void_p, c_bool]
|
|
2958
|
+
CallCFunction(GetDllLibXls().Workbook_set_ShowTabs, self.Ptr, value)
|
|
2959
|
+
|
|
2960
|
+
@property
|
|
2961
|
+
|
|
2962
|
+
def Styles(self)->'StylesCollection':
|
|
2963
|
+
"""
|
|
2964
|
+
<summary>
|
|
2965
|
+
Returns a Styles collection that represents all the styles in the specified workbook. Read-only.
|
|
2966
|
+
<example>The following code snippet illustrates how to get the Styles:
|
|
2967
|
+
<code>
|
|
2968
|
+
//Create worksheet
|
|
2969
|
+
Workbook workbook = new Workbook();
|
|
2970
|
+
Worksheet worksheet = workbook.Worksheets[0];
|
|
2971
|
+
//Set styles
|
|
2972
|
+
IStyles styles = workbook.Styles;
|
|
2973
|
+
</code>
|
|
2974
|
+
</example>
|
|
2975
|
+
</summary>
|
|
2976
|
+
"""
|
|
2977
|
+
GetDllLibXls().Workbook_get_Styles.argtypes=[c_void_p]
|
|
2978
|
+
GetDllLibXls().Workbook_get_Styles.restype=c_void_p
|
|
2979
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_Styles, self.Ptr)
|
|
2980
|
+
ret = None if intPtr==None else StylesCollection(intPtr)
|
|
2981
|
+
return ret
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
@property
|
|
2985
|
+
def UseStorageMode(self)->bool:
|
|
2986
|
+
"""
|
|
2987
|
+
<summary>
|
|
2988
|
+
User Compound storage mode
|
|
2989
|
+
</summary>
|
|
2990
|
+
"""
|
|
2991
|
+
GetDllLibXls().Workbook_get_UseStorageMode.argtypes=[c_void_p]
|
|
2992
|
+
GetDllLibXls().Workbook_get_UseStorageMode.restype=c_bool
|
|
2993
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_UseStorageMode, self.Ptr)
|
|
2994
|
+
return ret
|
|
2995
|
+
|
|
2996
|
+
@UseStorageMode.setter
|
|
2997
|
+
def UseStorageMode(self, value:bool):
|
|
2998
|
+
GetDllLibXls().Workbook_set_UseStorageMode.argtypes=[c_void_p, c_bool]
|
|
2999
|
+
CallCFunction(GetDllLibXls().Workbook_set_UseStorageMode, self.Ptr, value)
|
|
3000
|
+
|
|
3001
|
+
@property
|
|
3002
|
+
|
|
3003
|
+
def Version(self)->'ExcelVersion':
|
|
3004
|
+
"""
|
|
3005
|
+
|
|
3006
|
+
"""
|
|
3007
|
+
GetDllLibXls().Workbook_get_Version.argtypes=[c_void_p]
|
|
3008
|
+
GetDllLibXls().Workbook_get_Version.restype=c_int
|
|
3009
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_Version, self.Ptr)
|
|
3010
|
+
objwraped = ExcelVersion(ret)
|
|
3011
|
+
return objwraped
|
|
3012
|
+
|
|
3013
|
+
@Version.setter
|
|
3014
|
+
def Version(self, value:'ExcelVersion'):
|
|
3015
|
+
GetDllLibXls().Workbook_set_Version.argtypes=[c_void_p, c_int]
|
|
3016
|
+
CallCFunction(GetDllLibXls().Workbook_set_Version, self.Ptr, value.value)
|
|
3017
|
+
|
|
3018
|
+
@property
|
|
3019
|
+
def IsHideWindow(self)->bool:
|
|
3020
|
+
"""
|
|
3021
|
+
<summary>
|
|
3022
|
+
Hide window
|
|
3023
|
+
</summary>
|
|
3024
|
+
"""
|
|
3025
|
+
GetDllLibXls().Workbook_get_IsHideWindow.argtypes=[c_void_p]
|
|
3026
|
+
GetDllLibXls().Workbook_get_IsHideWindow.restype=c_bool
|
|
3027
|
+
ret = CallCFunction(GetDllLibXls().Workbook_get_IsHideWindow, self.Ptr)
|
|
3028
|
+
return ret
|
|
3029
|
+
|
|
3030
|
+
@IsHideWindow.setter
|
|
3031
|
+
def IsHideWindow(self, value:bool):
|
|
3032
|
+
GetDllLibXls().Workbook_set_IsHideWindow.argtypes=[c_void_p, c_bool]
|
|
3033
|
+
CallCFunction(GetDllLibXls().Workbook_set_IsHideWindow, self.Ptr, value)
|
|
3034
|
+
|
|
3035
|
+
@property
|
|
3036
|
+
|
|
3037
|
+
def Charts(self)->'ChartsCollection':
|
|
3038
|
+
"""
|
|
3039
|
+
<summary>
|
|
3040
|
+
Returns a Sheets collection that represents all the chart sheets in the specified workbook. Read-only.
|
|
3041
|
+
</summary>
|
|
3042
|
+
"""
|
|
3043
|
+
GetDllLibXls().Workbook_get_Charts.argtypes=[c_void_p]
|
|
3044
|
+
GetDllLibXls().Workbook_get_Charts.restype=c_void_p
|
|
3045
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_Charts, self.Ptr)
|
|
3046
|
+
ret = None if intPtr==None else ChartsCollection(intPtr)
|
|
3047
|
+
return ret
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
@property
|
|
3051
|
+
|
|
3052
|
+
def Chartsheets(self)->List['ChartSheet']:
|
|
3053
|
+
"""
|
|
3054
|
+
|
|
3055
|
+
"""
|
|
3056
|
+
GetDllLibXls().Workbook_get_Chartsheets.argtypes=[c_void_p]
|
|
3057
|
+
GetDllLibXls().Workbook_get_Chartsheets.restype=IntPtrArray
|
|
3058
|
+
intPtrArray = CallCFunction(GetDllLibXls().Workbook_get_Chartsheets, self.Ptr)
|
|
3059
|
+
ret = GetObjVectorFromArray(intPtrArray, ChartSheet)
|
|
3060
|
+
return ret
|
|
3061
|
+
|
|
3062
|
+
|
|
3063
|
+
|
|
3064
|
+
@property
|
|
3065
|
+
|
|
3066
|
+
def CustomDocumentProperties(self)->'ICustomDocumentProperties':
|
|
3067
|
+
"""
|
|
3068
|
+
<summary>
|
|
3069
|
+
Returns collection that represents all the custom document properties
|
|
3070
|
+
for the specified workbook. Read-only.
|
|
3071
|
+
<example>The following code snippet illustrates how to get the custom document properties:
|
|
3072
|
+
<code>
|
|
3073
|
+
//Create workbook
|
|
3074
|
+
Workbook workbook = new Workbook();
|
|
3075
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
3076
|
+
//Get the document properties
|
|
3077
|
+
ICustomDocumentProperties documentProperties = workbook.CustomDocumentProperties;
|
|
3078
|
+
</code>
|
|
3079
|
+
</example>
|
|
3080
|
+
</summary>
|
|
3081
|
+
"""
|
|
3082
|
+
GetDllLibXls().Workbook_get_CustomDocumentProperties.argtypes=[c_void_p]
|
|
3083
|
+
GetDllLibXls().Workbook_get_CustomDocumentProperties.restype=c_void_p
|
|
3084
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_CustomDocumentProperties, self.Ptr)
|
|
3085
|
+
ret = None if intPtr==None else ICustomDocumentProperties(intPtr)
|
|
3086
|
+
return ret
|
|
3087
|
+
|
|
3088
|
+
|
|
3089
|
+
# @property
|
|
3090
|
+
#
|
|
3091
|
+
# def CustomTableStyles(self)->'Dictionary2':
|
|
3092
|
+
# """
|
|
3093
|
+
#
|
|
3094
|
+
# """
|
|
3095
|
+
# GetDllLibXls().Workbook_get_CustomTableStyles.argtypes=[c_void_p]
|
|
3096
|
+
# GetDllLibXls().Workbook_get_CustomTableStyles.restype=c_void_p
|
|
3097
|
+
# intPtr = CallCFunction(GetDllLibXls().Workbook_get_CustomTableStyles, self.Ptr)
|
|
3098
|
+
# ret = None if intPtr==None else Dictionary2(intPtr)
|
|
3099
|
+
# return ret
|
|
3100
|
+
#
|
|
3101
|
+
|
|
3102
|
+
|
|
3103
|
+
@property
|
|
3104
|
+
|
|
3105
|
+
def DocumentProperties(self)->'BuiltInDocumentProperties':
|
|
3106
|
+
"""
|
|
3107
|
+
<summary>
|
|
3108
|
+
Returns a BuiltInDocumentProperties collection that represents all the built-in document properties for the specified workbook. Read-only.
|
|
3109
|
+
<example>The following code snippet illustrates how to get the built in document properties:
|
|
3110
|
+
<code>
|
|
3111
|
+
//Create workbook
|
|
3112
|
+
Workbook workbook = new Workbook();
|
|
3113
|
+
workbook.LoadFromFile("Sample.xlsx");
|
|
3114
|
+
//Get the built in document properties
|
|
3115
|
+
IBuiltInDocumentProperties builtInDocumentProperties = workbook.DocumentProperties;
|
|
3116
|
+
</code>
|
|
3117
|
+
</example>
|
|
3118
|
+
</summary>
|
|
3119
|
+
"""
|
|
3120
|
+
GetDllLibXls().Workbook_get_DocumentProperties.argtypes=[c_void_p]
|
|
3121
|
+
GetDllLibXls().Workbook_get_DocumentProperties.restype=c_void_p
|
|
3122
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_get_DocumentProperties, self.Ptr)
|
|
3123
|
+
ret = None if intPtr==None else BuiltInDocumentProperties(intPtr)
|
|
3124
|
+
return ret
|
|
3125
|
+
|
|
3126
|
+
|
|
3127
|
+
@staticmethod
|
|
3128
|
+
|
|
3129
|
+
def FixDateTimeNow()->'DateTime':
|
|
3130
|
+
"""
|
|
3131
|
+
|
|
3132
|
+
"""
|
|
3133
|
+
#GetDllLibXls().Workbook_FixDateTimeNow.argtypes=[]
|
|
3134
|
+
GetDllLibXls().Workbook_FixDateTimeNow.restype=c_void_p
|
|
3135
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FixDateTimeNow)
|
|
3136
|
+
ret = None if intPtr==None else DateTime(intPtr)
|
|
3137
|
+
return ret
|
|
3138
|
+
|
|
3139
|
+
|
|
3140
|
+
@staticmethod
|
|
3141
|
+
|
|
3142
|
+
def FixDateTimeToday()->'DateTime':
|
|
3143
|
+
"""
|
|
3144
|
+
|
|
3145
|
+
"""
|
|
3146
|
+
#GetDllLibXls().Workbook_FixDateTimeToday.argtypes=[]
|
|
3147
|
+
GetDllLibXls().Workbook_FixDateTimeToday.restype=c_void_p
|
|
3148
|
+
intPtr = CallCFunction(GetDllLibXls().Workbook_FixDateTimeToday)
|
|
3149
|
+
ret = None if intPtr==None else DateTime(intPtr)
|
|
3150
|
+
return ret
|
|
3151
|
+
|
|
3152
|
+
|