spire-xls 15.7.1__py3-none-win_amd64.whl → 15.11.1__py3-none-win_amd64.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/xls/AddtionalFormatWrapper.py +18 -15
- spire/xls/CellRange.py +10 -8
- spire/xls/CellStyleFlag.py +7 -0
- spire/xls/CellStyleObject.py +19 -12
- spire/xls/CommentsRange.py +6 -17
- spire/xls/ConverterSetting.py +15 -0
- spire/xls/DocumentProperty.py +1 -1
- spire/xls/ExcelCommentObject.py +6 -1
- spire/xls/ExcelFont.py +21 -15
- spire/xls/ExcelGradient.py +2 -0
- spire/xls/ExcelInterior.py +0 -13
- spire/xls/ExportTableOptions.py +6 -0
- spire/xls/Font.py +103 -103
- spire/xls/FontWrapper.py +20 -18
- spire/xls/GradientStops.py +1 -1
- spire/xls/HPageBreak.py +1 -0
- spire/xls/HyperLink.py +1 -0
- spire/xls/MsoTextFrame.py +102 -0
- spire/xls/RangeRichTextString.py +2 -2
- spire/xls/ReferRangeArea.py +0 -8
- spire/xls/RichText.py +1 -1
- spire/xls/RichTextShape.py +2 -1
- spire/xls/RichTextString.py +1 -0
- spire/xls/ShapeGlow.py +1 -1
- spire/xls/TextSaveOptions.py +7 -0
- spire/xls/VPageBreak.py +1 -0
- spire/xls/Workbook.py +85 -86
- spire/xls/Worksheet.py +63 -12
- spire/xls/XlsAddInFunction.py +4 -4
- spire/xls/XlsArcShape.py +1 -1
- spire/xls/XlsBorder.py +1 -0
- spire/xls/XlsButtonShape.py +1 -1
- spire/xls/XlsComment.py +1 -1
- spire/xls/XlsDataValidationTable.py +3 -1
- spire/xls/XlsFont.py +20 -14
- spire/xls/XlsName.py +14 -15
- spire/xls/XlsOvalShape.py +1 -1
- spire/xls/XlsPageSetup.py +8 -2
- spire/xls/XlsRadioButtonShape.py +21 -51
- spire/xls/XlsRange.py +26 -10
- spire/xls/XlsRectangleShape.py +1 -1
- spire/xls/XlsShape.py +7 -5
- spire/xls/XlsShapeFill.py +3 -0
- spire/xls/XlsStyle.py +3 -3
- spire/xls/XlsValidation.py +7 -4
- spire/xls/XlsWorkbook.py +50 -29
- spire/xls/XlsWorksheet.py +118 -121
- spire/xls/XlsWorksheetBase.py +39 -20
- spire/xls/__init__.py +2 -1
- spire/xls/autofilter/AutoFitterOptions.py +7 -0
- spire/xls/autofilter/CustomFilter.py +9 -1
- spire/xls/autofilter/FilterColumn.py +2 -2
- spire/xls/autofilter/XlsAutoFiltersCollection.py +1 -0
- spire/xls/charts/ChartArea.py +1 -0
- spire/xls/charts/XlsChart.py +1 -1
- spire/xls/charts/XlsChartFrameFormat.py +2 -1
- spire/xls/collection/ArcShapeCollection.py +1 -1
- spire/xls/collection/AutoFiltersCollection.py +1 -0
- spire/xls/collection/BordersCollectionArrayWrapper.py +2 -2
- spire/xls/collection/ButtonShapeCollection.py +4 -4
- spire/xls/collection/DataConnections.py +1 -1
- spire/xls/collection/ExternalLinkCollection.py +2 -1
- spire/xls/collection/GroupBoxCollection.py +4 -4
- spire/xls/collection/QueryTableCollection.py +1 -1
- spire/xls/collection/RangesCollection.py +4 -3
- spire/xls/collection/ShapeCollectionBase.py +6 -6
- spire/xls/collection/WorksheetsCollection.py +6 -6
- spire/xls/collection/XlsBordersCollection.py +2 -2
- spire/xls/collection/XlsChartsCollection.py +10 -8
- spire/xls/collection/XlsDataValidationCollection.py +4 -2
- spire/xls/collection/XlsFontsCollection.py +2 -1
- spire/xls/collection/XlsRangesCollection.py +17 -10
- spire/xls/collection/XlsStylesCollection.py +2 -2
- spire/xls/collection/XlsWorkbookObjectsCollection.py +5 -4
- spire/xls/collection/pivot_table/XlsPivotCachesCollection.py +1 -0
- spire/xls/collection/pivot_table/XlsPivotTablesCollection.py +1 -0
- spire/xls/conditional_formatting/ConditionalFormatWrapper.py +2 -2
- spire/xls/conditional_formatting/XlsConditionalFormat.py +10 -2
- spire/xls/conditional_formatting/XlsConditionalFormats.py +10 -5
- spire/xls/interfaces/IWorksheet.py +10 -10
- spire/xls/interfaces/ImportObjectOptions.py +7 -0
- spire/xls/lib/Spire.Xls.Base.dll +0 -0
- spire/xls/pivot_tables/PivotStyle.py +1 -0
- spire/xls/pivot_tables/PivotTableStyle.py +19 -12
- {spire_xls-15.7.1.dist-info → spire_xls-15.11.1.dist-info}/METADATA +1 -1
- {spire_xls-15.7.1.dist-info → spire_xls-15.11.1.dist-info}/RECORD +88 -87
- {spire_xls-15.7.1.dist-info → spire_xls-15.11.1.dist-info}/WHEEL +0 -0
- {spire_xls-15.7.1.dist-info → spire_xls-15.11.1.dist-info}/top_level.txt +0 -0
spire/xls/XlsRadioButtonShape.py
CHANGED
|
@@ -180,81 +180,51 @@ class XlsRadioButtonShape ( XlsShape, IRadioButton) :
|
|
|
180
180
|
@property
|
|
181
181
|
|
|
182
182
|
def HAlignment(self)->'CommentHAlignType':
|
|
183
|
-
"""Gets or sets the horizontal alignment of text in the radio button.
|
|
184
|
-
|
|
185
|
-
Returns:
|
|
186
|
-
CommentHAlignType: An enumeration value representing the horizontal alignment.
|
|
187
183
|
"""
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
objwraped = CommentHAlignType(ret)
|
|
192
|
-
return objwraped
|
|
184
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
185
|
+
"""
|
|
186
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
193
187
|
|
|
194
188
|
@HAlignment.setter
|
|
195
189
|
def HAlignment(self, value:'CommentHAlignType'):
|
|
196
|
-
"""Sets the horizontal alignment of text in the radio button.
|
|
197
|
-
|
|
198
|
-
Args:
|
|
199
|
-
value (CommentHAlignType): An enumeration value representing the horizontal alignment.
|
|
200
190
|
"""
|
|
201
|
-
|
|
202
|
-
|
|
191
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
192
|
+
"""
|
|
193
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
203
194
|
|
|
204
195
|
@property
|
|
205
196
|
|
|
206
197
|
def VAlignment(self)->'CommentVAlignType':
|
|
207
|
-
"""Gets or sets the vertical alignment of text in the radio button.
|
|
208
|
-
|
|
209
|
-
Returns:
|
|
210
|
-
CommentVAlignType: An enumeration value representing the vertical alignment.
|
|
211
198
|
"""
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
objwraped = CommentVAlignType(ret)
|
|
216
|
-
return objwraped
|
|
199
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
200
|
+
"""
|
|
201
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
217
202
|
|
|
218
203
|
@VAlignment.setter
|
|
219
204
|
def VAlignment(self, value:'CommentVAlignType'):
|
|
220
|
-
"""Sets the vertical alignment of text in the radio button.
|
|
221
|
-
|
|
222
|
-
Args:
|
|
223
|
-
value (CommentVAlignType): An enumeration value representing the vertical alignment.
|
|
224
205
|
"""
|
|
225
|
-
|
|
226
|
-
|
|
206
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
207
|
+
"""
|
|
208
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
227
209
|
|
|
228
210
|
@property
|
|
229
211
|
|
|
230
212
|
def TextRotation(self)->'TextRotationType':
|
|
231
|
-
"""Gets or sets the text rotation in the radio button.
|
|
232
|
-
|
|
233
|
-
Returns:
|
|
234
|
-
TextRotationType: An enumeration value representing the text rotation.
|
|
235
213
|
"""
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
objwraped = TextRotationType(ret)
|
|
240
|
-
return objwraped
|
|
214
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
215
|
+
"""
|
|
216
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
241
217
|
|
|
242
218
|
@TextRotation.setter
|
|
243
219
|
def TextRotation(self, value:'TextRotationType'):
|
|
244
|
-
"""Sets the text rotation in the radio button.
|
|
245
|
-
|
|
246
|
-
Args:
|
|
247
|
-
value (TextRotationType): An enumeration value representing the text rotation.
|
|
248
220
|
"""
|
|
249
|
-
|
|
250
|
-
|
|
221
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
222
|
+
"""
|
|
223
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
251
224
|
|
|
252
225
|
def SetRichText(self, value:RichTextString):
|
|
253
|
-
"""Sets rich text formatting for the radio button text.
|
|
254
|
-
|
|
255
|
-
Args:
|
|
256
|
-
value (RichTextString): A rich text string object containing the formatted text.
|
|
257
226
|
"""
|
|
258
|
-
|
|
259
|
-
|
|
227
|
+
Raises NotImplementedError: This method is not supported in this class.
|
|
228
|
+
"""
|
|
229
|
+
raise NotImplementedError("This method is not supported in this class")
|
|
260
230
|
|
spire/xls/XlsRange.py
CHANGED
|
@@ -310,7 +310,7 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
310
310
|
"""
|
|
311
311
|
|
|
312
312
|
"""
|
|
313
|
-
|
|
313
|
+
from spire.xls.XlsComment import XlsComment
|
|
314
314
|
GetDllLibXls().XlsRange_AddComment.argtypes=[c_void_p ,c_bool]
|
|
315
315
|
GetDllLibXls().XlsRange_AddComment.restype=c_void_p
|
|
316
316
|
intPtr = CallCFunction(GetDllLibXls().XlsRange_AddComment, self.Ptr, bIsParseOptions)
|
|
@@ -489,6 +489,7 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
489
489
|
|
|
490
490
|
"""
|
|
491
491
|
intPtrrange:c_void_p = range.Ptr
|
|
492
|
+
from spire.xls.collection.RangesCollection import RangesCollection
|
|
492
493
|
|
|
493
494
|
GetDllLibXls().XlsRange_Union.argtypes=[c_void_p ,c_void_p]
|
|
494
495
|
GetDllLibXls().XlsRange_Union.restype=c_void_p
|
|
@@ -635,11 +636,14 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
635
636
|
"""
|
|
636
637
|
|
|
637
638
|
"""
|
|
638
|
-
from spire.xls.
|
|
639
|
+
from spire.xls.RangeRichTextString import RangeRichTextString
|
|
640
|
+
from spire.xls.RTFStringArray import RTFStringArray
|
|
639
641
|
GetDllLibXls().XlsRange_get_RichText.argtypes=[c_void_p]
|
|
640
642
|
GetDllLibXls().XlsRange_get_RichText.restype=c_void_p
|
|
641
643
|
intPtr = CallCFunction(GetDllLibXls().XlsRange_get_RichText, self.Ptr)
|
|
642
|
-
|
|
644
|
+
if intPtr==None:
|
|
645
|
+
return None
|
|
646
|
+
ret = RangeRichTextString(intPtr) if self.__Is_Single_Cell__() else RTFStringArray(intPtr)
|
|
643
647
|
return ret
|
|
644
648
|
|
|
645
649
|
|
|
@@ -725,21 +729,25 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
725
729
|
|
|
726
730
|
@property
|
|
727
731
|
|
|
728
|
-
def ExtendedFormatIndex(self)->
|
|
732
|
+
def ExtendedFormatIndex(self)->int:
|
|
729
733
|
"""
|
|
730
734
|
|
|
731
735
|
"""
|
|
732
736
|
GetDllLibXls().XlsRange_get_ExtendedFormatIndex.argtypes=[c_void_p]
|
|
733
737
|
GetDllLibXls().XlsRange_get_ExtendedFormatIndex.restype=c_void_p
|
|
734
738
|
intPtr = CallCFunction(GetDllLibXls().XlsRange_get_ExtendedFormatIndex, self.Ptr)
|
|
735
|
-
|
|
739
|
+
if intPtr == None:
|
|
740
|
+
return None
|
|
741
|
+
dlllib.UInt16_Value.argtypes=[c_void_p]
|
|
742
|
+
dlllib.UInt16_Value.restype=c_int
|
|
743
|
+
ret = CallCFunction(dlllib.UInt16_Value, intPtr)
|
|
736
744
|
return ret
|
|
737
745
|
|
|
738
746
|
|
|
739
747
|
@ExtendedFormatIndex.setter
|
|
740
|
-
def ExtendedFormatIndex(self, value:
|
|
741
|
-
GetDllLibXls().
|
|
742
|
-
CallCFunction(GetDllLibXls().
|
|
748
|
+
def ExtendedFormatIndex(self, value:int):
|
|
749
|
+
GetDllLibXls().XlsRange_SetExtendedFormatIndex.argtypes=[c_void_p, c_int]
|
|
750
|
+
CallCFunction(GetDllLibXls().XlsRange_SetExtendedFormatIndex, self.Ptr, value)
|
|
743
751
|
|
|
744
752
|
|
|
745
753
|
def SetExtendedFormatIndex(self ,index:int):
|
|
@@ -984,6 +992,7 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
984
992
|
Returns a worksheet object that represents the worksheet containing the specified range.
|
|
985
993
|
|
|
986
994
|
"""
|
|
995
|
+
from spire.xls.XlsWorksheet import XlsWorksheet
|
|
987
996
|
GetDllLibXls().XlsRange_get_Worksheet.argtypes=[c_void_p]
|
|
988
997
|
GetDllLibXls().XlsRange_get_Worksheet.restype=c_void_p
|
|
989
998
|
intPtr = CallCFunction(GetDllLibXls().XlsRange_get_Worksheet, self.Ptr)
|
|
@@ -1043,7 +1052,7 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
1043
1052
|
GetDllLibXls().XlsRange_GetRectangles.argtypes=[c_void_p]
|
|
1044
1053
|
GetDllLibXls().XlsRange_GetRectangles.restype=IntPtrArray
|
|
1045
1054
|
intPtrArray = CallCFunction(GetDllLibXls().XlsRange_GetRectangles, self.Ptr)
|
|
1046
|
-
ret =
|
|
1055
|
+
ret = GetObjVectorFromArray(intPtrArray, Rectangle)
|
|
1047
1056
|
return ret
|
|
1048
1057
|
|
|
1049
1058
|
|
|
@@ -1162,6 +1171,7 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
1162
1171
|
Created comment or exists one.
|
|
1163
1172
|
|
|
1164
1173
|
"""
|
|
1174
|
+
from spire.xls.XlsComment import XlsComment
|
|
1165
1175
|
GetDllLibXls().XlsRange_AddComment1.argtypes=[c_void_p]
|
|
1166
1176
|
GetDllLibXls().XlsRange_AddComment1.restype=c_void_p
|
|
1167
1177
|
intPtr = CallCFunction(GetDllLibXls().XlsRange_AddComment1, self.Ptr)
|
|
@@ -1869,12 +1879,18 @@ class XlsRange ( XlsObject, ICombinedRange,IEnumerable[IXLSRange]) :
|
|
|
1869
1879
|
Returns a Comment object that represents the comment associated with the cell in the upper-left corner of the range.
|
|
1870
1880
|
|
|
1871
1881
|
"""
|
|
1882
|
+
from spire.xls.XlsComment import XlsComment
|
|
1883
|
+
from spire.xls.CommentsRange import CommentsRange
|
|
1872
1884
|
GetDllLibXls().XlsRange_get_Comment.argtypes=[c_void_p]
|
|
1873
1885
|
GetDllLibXls().XlsRange_get_Comment.restype=c_void_p
|
|
1874
1886
|
intPtr = CallCFunction(GetDllLibXls().XlsRange_get_Comment, self.Ptr)
|
|
1875
|
-
|
|
1887
|
+
if intPtr==None:
|
|
1888
|
+
return None
|
|
1889
|
+
ret = XlsComment(intPtr) if self.__Is_Single_Cell__() else CommentsRange(intPtr)
|
|
1876
1890
|
return ret
|
|
1877
1891
|
|
|
1892
|
+
def __Is_Single_Cell__(self)->bool:
|
|
1893
|
+
return self.Row == self.LastRow and self.Column == self.LastColumn
|
|
1878
1894
|
|
|
1879
1895
|
@property
|
|
1880
1896
|
|
spire/xls/XlsRectangleShape.py
CHANGED
|
@@ -121,7 +121,7 @@ class XlsRectangleShape ( XlsPrstGeomShape, IRectangleShape) :
|
|
|
121
121
|
GetDllLibXls().XlsRectangleShape_get_RichText.argtypes=[c_void_p]
|
|
122
122
|
GetDllLibXls().XlsRectangleShape_get_RichText.restype=c_void_p
|
|
123
123
|
intPtr = CallCFunction(GetDllLibXls().XlsRectangleShape_get_RichText, self.Ptr)
|
|
124
|
-
ret = None if intPtr==None else
|
|
124
|
+
ret = None if intPtr==None else RichTextShape(intPtr)
|
|
125
125
|
return ret
|
|
126
126
|
|
|
127
127
|
|
spire/xls/XlsShape.py
CHANGED
|
@@ -76,17 +76,17 @@ class XlsShape ( XlsObject, IShape, ICloneParent, INamedObject) :
|
|
|
76
76
|
"""Creates a clone of the current shape.
|
|
77
77
|
|
|
78
78
|
Args:
|
|
79
|
-
parent (
|
|
79
|
+
parent (Worksheet): New parent for the shape object.
|
|
80
80
|
|
|
81
81
|
Returns:
|
|
82
|
-
|
|
82
|
+
XlsShape: A copy of the current shape.
|
|
83
83
|
"""
|
|
84
84
|
intPtrparent:c_void_p = parent.Ptr
|
|
85
85
|
|
|
86
86
|
GetDllLibXls().XlsShape_Clone.argtypes=[c_void_p ,c_void_p]
|
|
87
87
|
GetDllLibXls().XlsShape_Clone.restype=c_void_p
|
|
88
88
|
intPtr = CallCFunction(GetDllLibXls().XlsShape_Clone, self.Ptr, intPtrparent)
|
|
89
|
-
ret = None if intPtr==None else
|
|
89
|
+
ret = None if intPtr==None else XlsShape(intPtr)
|
|
90
90
|
return ret
|
|
91
91
|
|
|
92
92
|
|
|
@@ -1002,6 +1002,7 @@ class XlsShape ( XlsObject, IShape, ICloneParent, INamedObject) :
|
|
|
1002
1002
|
Returns:
|
|
1003
1003
|
IGlow: An object representing the glow effect settings of the shape.
|
|
1004
1004
|
"""
|
|
1005
|
+
from spire.xls.ShapeGlow import ShapeGlow
|
|
1005
1006
|
GetDllLibXls().XlsShape_get_Glow.argtypes=[c_void_p]
|
|
1006
1007
|
GetDllLibXls().XlsShape_get_Glow.restype=c_void_p
|
|
1007
1008
|
intPtr = CallCFunction(GetDllLibXls().XlsShape_get_Glow, self.Ptr)
|
|
@@ -1017,6 +1018,7 @@ class XlsShape ( XlsObject, IShape, ICloneParent, INamedObject) :
|
|
|
1017
1018
|
Returns:
|
|
1018
1019
|
IReflectionEffect: An object representing the reflection effect settings of the shape.
|
|
1019
1020
|
"""
|
|
1021
|
+
from spire.xls.ShapeReflection import ShapeReflection
|
|
1020
1022
|
GetDllLibXls().XlsShape_get_Reflection.argtypes=[c_void_p]
|
|
1021
1023
|
GetDllLibXls().XlsShape_get_Reflection.restype=c_void_p
|
|
1022
1024
|
intPtr = CallCFunction(GetDllLibXls().XlsShape_get_Reflection, self.Ptr)
|
|
@@ -1035,7 +1037,7 @@ class XlsShape ( XlsObject, IShape, ICloneParent, INamedObject) :
|
|
|
1035
1037
|
GetDllLibXls().XlsShape_get_RichText.argtypes=[c_void_p]
|
|
1036
1038
|
GetDllLibXls().XlsShape_get_RichText.restype=c_void_p
|
|
1037
1039
|
intPtr = CallCFunction(GetDllLibXls().XlsShape_get_RichText, self.Ptr)
|
|
1038
|
-
ret = None if intPtr==None else
|
|
1040
|
+
ret = None if intPtr==None else RichTextShape(intPtr)
|
|
1039
1041
|
return ret
|
|
1040
1042
|
|
|
1041
1043
|
|
|
@@ -1077,7 +1079,7 @@ class XlsShape ( XlsObject, IShape, ICloneParent, INamedObject) :
|
|
|
1077
1079
|
GetDllLibXls().XlsShape_get_TextFrame.argtypes=[c_void_p]
|
|
1078
1080
|
GetDllLibXls().XlsShape_get_TextFrame.restype=c_void_p
|
|
1079
1081
|
intPtr = CallCFunction(GetDllLibXls().XlsShape_get_TextFrame, self.Ptr)
|
|
1080
|
-
ret = None if intPtr==None else
|
|
1082
|
+
ret = None if intPtr==None else MsoTextFrame(intPtr)
|
|
1081
1083
|
return ret
|
|
1082
1084
|
|
|
1083
1085
|
|
spire/xls/XlsShapeFill.py
CHANGED
|
@@ -23,6 +23,7 @@ class XlsShapeFill ( XlsObject, IShapeFill) :
|
|
|
23
23
|
Returns:
|
|
24
24
|
GradientStops: A collection of gradient stops used in the gradient fill.
|
|
25
25
|
"""
|
|
26
|
+
from spire.xls.GradientStops import GradientStops
|
|
26
27
|
GetDllLibXls().XlsShapeFill_get_GradientStops.argtypes=[c_void_p]
|
|
27
28
|
GetDllLibXls().XlsShapeFill_get_GradientStops.restype=c_void_p
|
|
28
29
|
intPtr = CallCFunction(GetDllLibXls().XlsShapeFill_get_GradientStops, self.Ptr)
|
|
@@ -322,6 +323,7 @@ class XlsShapeFill ( XlsObject, IShapeFill) :
|
|
|
322
323
|
Returns:
|
|
323
324
|
OColor: An Office color object representing the background color.
|
|
324
325
|
"""
|
|
326
|
+
from spire.xls.OColor import OColor
|
|
325
327
|
GetDllLibXls().XlsShapeFill_get_BackColorObject.argtypes=[c_void_p]
|
|
326
328
|
GetDllLibXls().XlsShapeFill_get_BackColorObject.restype=c_void_p
|
|
327
329
|
intPtr = CallCFunction(GetDllLibXls().XlsShapeFill_get_BackColorObject, self.Ptr)
|
|
@@ -339,6 +341,7 @@ class XlsShapeFill ( XlsObject, IShapeFill) :
|
|
|
339
341
|
Returns:
|
|
340
342
|
OColor: An Office color object representing the foreground color.
|
|
341
343
|
"""
|
|
344
|
+
from spire.xls.OColor import OColor
|
|
342
345
|
GetDllLibXls().XlsShapeFill_get_ForeColorObject.argtypes=[c_void_p]
|
|
343
346
|
GetDllLibXls().XlsShapeFill_get_ForeColorObject.restype=c_void_p
|
|
344
347
|
intPtr = CallCFunction(GetDllLibXls().XlsShapeFill_get_ForeColorObject, self.Ptr)
|
spire/xls/XlsStyle.py
CHANGED
|
@@ -64,7 +64,7 @@ class XlsStyle ( AddtionalFormatWrapper, INamedObject) :
|
|
|
64
64
|
return ret
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
def Clone(self ,parent:'SpireObject')->'
|
|
67
|
+
def Clone(self ,parent:'SpireObject')->'XlsStyle':
|
|
68
68
|
"""Creates a copy of the style.
|
|
69
69
|
|
|
70
70
|
Args:
|
|
@@ -78,7 +78,7 @@ class XlsStyle ( AddtionalFormatWrapper, INamedObject) :
|
|
|
78
78
|
GetDllLibXls().XlsStyle_Clone.argtypes=[c_void_p ,c_void_p]
|
|
79
79
|
GetDllLibXls().XlsStyle_Clone.restype=c_void_p
|
|
80
80
|
intPtr = CallCFunction(GetDllLibXls().XlsStyle_Clone, self.Ptr, intPtrparent)
|
|
81
|
-
ret = None if intPtr==None else
|
|
81
|
+
ret = None if intPtr==None else XlsStyle(intPtr)
|
|
82
82
|
return ret
|
|
83
83
|
|
|
84
84
|
|
|
@@ -132,6 +132,6 @@ class XlsStyle ( AddtionalFormatWrapper, INamedObject) :
|
|
|
132
132
|
#GetDllLibXls().XlsStyle_DEF_DEFAULT_STYLES.argtypes=[]
|
|
133
133
|
GetDllLibXls().XlsStyle_DEF_DEFAULT_STYLES.restype=IntPtrArray
|
|
134
134
|
intPtrArray = CallCFunction(GetDllLibXls().XlsStyle_DEF_DEFAULT_STYLES)
|
|
135
|
-
ret =
|
|
135
|
+
ret = GetStrVectorFromArray(intPtrArray, c_wchar_p)
|
|
136
136
|
return ret
|
|
137
137
|
|
spire/xls/XlsValidation.py
CHANGED
|
@@ -6,7 +6,7 @@ from spire.xls import *
|
|
|
6
6
|
from ctypes import *
|
|
7
7
|
import abc
|
|
8
8
|
|
|
9
|
-
class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICloneParent) :
|
|
9
|
+
class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICloneParent,SpireObject) :
|
|
10
10
|
"""Represents a data validation rule in an Excel worksheet.
|
|
11
11
|
|
|
12
12
|
This class provides functionality for creating and managing data validation rules
|
|
@@ -551,7 +551,7 @@ class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICl
|
|
|
551
551
|
GetDllLibXls().XlsValidation_get_Values.argtypes=[c_void_p]
|
|
552
552
|
GetDllLibXls().XlsValidation_get_Values.restype=IntPtrArray
|
|
553
553
|
intPtrArray = CallCFunction(GetDllLibXls().XlsValidation_get_Values, self.Ptr)
|
|
554
|
-
ret =
|
|
554
|
+
ret = GetStrVectorFromArray(intPtrArray, c_wchar_p)
|
|
555
555
|
return ret
|
|
556
556
|
|
|
557
557
|
@Values.setter
|
|
@@ -668,6 +668,7 @@ class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICl
|
|
|
668
668
|
Returns:
|
|
669
669
|
XlsWorksheet: The worksheet containing this validation rule.
|
|
670
670
|
"""
|
|
671
|
+
from spire.xls.XlsWorksheet import XlsWorksheet
|
|
671
672
|
GetDllLibXls().XlsValidation_get_Worksheet.argtypes=[c_void_p]
|
|
672
673
|
GetDllLibXls().XlsValidation_get_Worksheet.restype=c_void_p
|
|
673
674
|
intPtr = CallCFunction(GetDllLibXls().XlsValidation_get_Worksheet, self.Ptr)
|
|
@@ -706,7 +707,7 @@ class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICl
|
|
|
706
707
|
GetDllLibXls().XlsValidation_Clone.argtypes=[c_void_p ,c_void_p]
|
|
707
708
|
GetDllLibXls().XlsValidation_Clone.restype=c_void_p
|
|
708
709
|
intPtr = CallCFunction(GetDllLibXls().XlsValidation_Clone, self.Ptr, intPtrparent)
|
|
709
|
-
ret = None if intPtr==None else
|
|
710
|
+
ret = None if intPtr==None else XlsValidation(intPtr)
|
|
710
711
|
return ret
|
|
711
712
|
|
|
712
713
|
|
|
@@ -718,10 +719,11 @@ class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICl
|
|
|
718
719
|
Returns:
|
|
719
720
|
SpireObject: The parent object of this validation rule.
|
|
720
721
|
"""
|
|
722
|
+
from spire.xls.collection.XlsDataValidationCollection import XlsDataValidationCollection
|
|
721
723
|
GetDllLibXls().XlsValidation_get_Parent.argtypes=[c_void_p]
|
|
722
724
|
GetDllLibXls().XlsValidation_get_Parent.restype=c_void_p
|
|
723
725
|
intPtr = CallCFunction(GetDllLibXls().XlsValidation_get_Parent, self.Ptr)
|
|
724
|
-
ret = None if intPtr==None else
|
|
726
|
+
ret = None if intPtr==None else XlsDataValidationCollection(intPtr)
|
|
725
727
|
return ret
|
|
726
728
|
|
|
727
729
|
|
|
@@ -733,6 +735,7 @@ class XlsValidation ( IDataValidation, IExcelApplication, IOptimizedUpdate, ICl
|
|
|
733
735
|
Returns:
|
|
734
736
|
XlsDataValidationCollection: The collection containing this validation rule.
|
|
735
737
|
"""
|
|
738
|
+
from spire.xls.collection.XlsDataValidationCollection import XlsDataValidationCollection
|
|
736
739
|
GetDllLibXls().XlsValidation_get_ParentCollection.argtypes=[c_void_p]
|
|
737
740
|
GetDllLibXls().XlsValidation_get_ParentCollection.restype=c_void_p
|
|
738
741
|
intPtr = CallCFunction(GetDllLibXls().XlsValidation_get_ParentCollection, self.Ptr)
|
spire/xls/XlsWorkbook.py
CHANGED
|
@@ -11,6 +11,23 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
11
11
|
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
+
@property
|
|
15
|
+
|
|
16
|
+
def PivotCaches(self)->'XlsPivotCachesCollection':
|
|
17
|
+
"""
|
|
18
|
+
Returns pivot caches collection. Read-only.
|
|
19
|
+
Example::
|
|
20
|
+
|
|
21
|
+
#Create worksheet
|
|
22
|
+
workbook = Workbook()
|
|
23
|
+
workbook.LoadFromFile("Sample.xlsx")
|
|
24
|
+
worksheet = workbook.Worksheets[0]
|
|
25
|
+
#Gets pivot caches collection
|
|
26
|
+
pivotCaches = workbook.PivotCaches
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
raise NotImplementedError("use Workbook.PivotCaches instead")
|
|
30
|
+
|
|
14
31
|
def CreateTemplateMarkersProcessor(self)->'IMarkersDesigner':
|
|
15
32
|
"""
|
|
16
33
|
Creates and returns a template markers processor for the workbook.
|
|
@@ -88,8 +105,12 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
88
105
|
GetDllLibXls().XlsWorkbook_AddFont.argtypes=[c_void_p ,c_void_p]
|
|
89
106
|
GetDllLibXls().XlsWorkbook_AddFont.restype=c_void_p
|
|
90
107
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_AddFont, self.Ptr, intPtrfontToAdd)
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
if intPtr==None:
|
|
109
|
+
return None
|
|
110
|
+
if isinstance(fontToAdd,XlsFont):
|
|
111
|
+
return XlsFont(intPtr)
|
|
112
|
+
elif isinstance(fontToAdd,FontWrapper):
|
|
113
|
+
return FontWrapper(intPtr)
|
|
93
114
|
|
|
94
115
|
|
|
95
116
|
def Activate(self):
|
|
@@ -409,7 +430,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
409
430
|
GetDllLibXls().XlsWorkbook_get_Styles.argtypes=[c_void_p]
|
|
410
431
|
GetDllLibXls().XlsWorkbook_get_Styles.restype=c_void_p
|
|
411
432
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_Styles, self.Ptr)
|
|
412
|
-
ret = None if intPtr==None else
|
|
433
|
+
ret = None if intPtr==None else XlsStylesCollection(intPtr)
|
|
413
434
|
return ret
|
|
414
435
|
|
|
415
436
|
|
|
@@ -425,7 +446,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
425
446
|
GetDllLibXls().XlsWorkbook_get_TabSheets.argtypes=[c_void_p]
|
|
426
447
|
GetDllLibXls().XlsWorkbook_get_TabSheets.restype=c_void_p
|
|
427
448
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_TabSheets, self.Ptr)
|
|
428
|
-
ret = None if intPtr==None else
|
|
449
|
+
ret = None if intPtr==None else XlsWorkbookObjectsCollection(intPtr)
|
|
429
450
|
return ret
|
|
430
451
|
|
|
431
452
|
|
|
@@ -713,25 +734,25 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
713
734
|
CallCFunction(GetDllLibXls().XlsWorkbook_SaveAsEmfStream, self.Ptr, sheetIndex,intPtrEmfStream,firstRow,firstColumn,lastRow,lastColumn)
|
|
714
735
|
|
|
715
736
|
|
|
716
|
-
def SaveChartAsEmfImage(self ,worksheet:'Worksheet',chartIndex:int,imageOrPrintOptions:'ConverterSetting',emfStream:'Stream')->'Stream':
|
|
717
|
-
|
|
718
|
-
|
|
737
|
+
# def SaveChartAsEmfImage(self ,worksheet:'Worksheet',chartIndex:int,imageOrPrintOptions:'ConverterSetting',emfStream:'Stream')->'Stream':
|
|
738
|
+
# """
|
|
739
|
+
# Saves the specified chart of the worksheet as an EMF image.
|
|
719
740
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
741
|
+
# Args:
|
|
742
|
+
# worksheet (Worksheet): The worksheet containing the chart.
|
|
743
|
+
# chartIndex (int): The index of the chart to save.
|
|
744
|
+
# imageOrPrintOptions (ConverterSetting): The options for the image or print.
|
|
745
|
+
# emfStream (Stream): The stream to save the EMF image to.
|
|
746
|
+
# """
|
|
747
|
+
# intPtrworksheet:c_void_p = worksheet.Ptr
|
|
748
|
+
# intPtrimageOrPrintOptions:c_void_p = imageOrPrintOptions.Ptr
|
|
749
|
+
# intPtremfStream:c_void_p = emfStream.Ptr
|
|
729
750
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
751
|
+
# GetDllLibXls().XlsWorkbook_SaveChartAsEmfImage.argtypes=[c_void_p ,c_void_p,c_int,c_void_p,c_void_p]
|
|
752
|
+
# GetDllLibXls().XlsWorkbook_SaveChartAsEmfImage.restype=c_void_p
|
|
753
|
+
# intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_SaveChartAsEmfImage, self.Ptr, intPtrworksheet,chartIndex,intPtrimageOrPrintOptions,intPtremfStream)
|
|
754
|
+
# ret = None if intPtr==None else Stream(intPtr)
|
|
755
|
+
# return ret
|
|
735
756
|
|
|
736
757
|
|
|
737
758
|
@dispatch
|
|
@@ -1127,7 +1148,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
1127
1148
|
GetDllLibXls().XlsWorkbook_CreateFont.argtypes=[c_void_p]
|
|
1128
1149
|
GetDllLibXls().XlsWorkbook_CreateFont.restype=c_void_p
|
|
1129
1150
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_CreateFont, self.Ptr)
|
|
1130
|
-
ret = None if intPtr==None else
|
|
1151
|
+
ret = None if intPtr==None else FontWrapper(intPtr)
|
|
1131
1152
|
return ret
|
|
1132
1153
|
|
|
1133
1154
|
|
|
@@ -1148,7 +1169,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
1148
1169
|
GetDllLibXls().XlsWorkbook_CreateFontN.argtypes=[c_void_p ,c_void_p]
|
|
1149
1170
|
GetDllLibXls().XlsWorkbook_CreateFontN.restype=c_void_p
|
|
1150
1171
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_CreateFontN, self.Ptr, intPtrnativeFont)
|
|
1151
|
-
ret = None if intPtr==None else
|
|
1172
|
+
ret = None if intPtr==None else FontWrapper(intPtr)
|
|
1152
1173
|
return ret
|
|
1153
1174
|
|
|
1154
1175
|
|
|
@@ -1659,7 +1680,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
1659
1680
|
GetDllLibXls().XlsWorkbook_get_Worksheets.argtypes=[c_void_p]
|
|
1660
1681
|
GetDllLibXls().XlsWorkbook_get_Worksheets.restype=c_void_p
|
|
1661
1682
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_Worksheets, self.Ptr)
|
|
1662
|
-
ret = None if intPtr==None else
|
|
1683
|
+
ret = None if intPtr==None else XlsWorksheetsCollection(intPtr)
|
|
1663
1684
|
return ret
|
|
1664
1685
|
|
|
1665
1686
|
|
|
@@ -1691,7 +1712,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
1691
1712
|
GetDllLibXls().XlsWorkbook_get_InnerFonts.argtypes=[c_void_p]
|
|
1692
1713
|
GetDllLibXls().XlsWorkbook_get_InnerFonts.restype=c_void_p
|
|
1693
1714
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_InnerFonts, self.Ptr)
|
|
1694
|
-
ret = None if intPtr==None else
|
|
1715
|
+
ret = None if intPtr==None else FontsCollection(intPtr)
|
|
1695
1716
|
return ret
|
|
1696
1717
|
|
|
1697
1718
|
|
|
@@ -1859,7 +1880,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
1859
1880
|
GetDllLibXls().XlsWorkbook_get_Palette.argtypes=[c_void_p]
|
|
1860
1881
|
GetDllLibXls().XlsWorkbook_get_Palette.restype=IntPtrArray
|
|
1861
1882
|
intPtrArray = CallCFunction(GetDllLibXls().XlsWorkbook_get_Palette, self.Ptr)
|
|
1862
|
-
ret =
|
|
1883
|
+
ret = GetObjVectorFromArray(intPtrArray, Color)
|
|
1863
1884
|
return ret
|
|
1864
1885
|
|
|
1865
1886
|
|
|
@@ -2073,7 +2094,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
2073
2094
|
GetDllLibXls().XlsWorkbook_get_AddInFunctions.argtypes=[c_void_p]
|
|
2074
2095
|
GetDllLibXls().XlsWorkbook_get_AddInFunctions.restype=c_void_p
|
|
2075
2096
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_AddInFunctions, self.Ptr)
|
|
2076
|
-
ret = None if intPtr==None else
|
|
2097
|
+
ret = None if intPtr==None else XlsAddInFunctionsCollection(intPtr)
|
|
2077
2098
|
return ret
|
|
2078
2099
|
|
|
2079
2100
|
|
|
@@ -2122,7 +2143,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
2122
2143
|
GetDllLibXls().XlsWorkbook_get_BuiltInDocumentProperties.argtypes=[c_void_p]
|
|
2123
2144
|
GetDllLibXls().XlsWorkbook_get_BuiltInDocumentProperties.restype=c_void_p
|
|
2124
2145
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_BuiltInDocumentProperties, self.Ptr)
|
|
2125
|
-
ret = None if intPtr==None else
|
|
2146
|
+
ret = None if intPtr==None else XlsBuiltInDocumentProperties(intPtr)
|
|
2126
2147
|
return ret
|
|
2127
2148
|
|
|
2128
2149
|
|
|
@@ -2138,7 +2159,7 @@ class XlsWorkbook ( XlsObject, IWorkbook) :
|
|
|
2138
2159
|
GetDllLibXls().XlsWorkbook_get_Charts.argtypes=[c_void_p]
|
|
2139
2160
|
GetDllLibXls().XlsWorkbook_get_Charts.restype=c_void_p
|
|
2140
2161
|
intPtr = CallCFunction(GetDllLibXls().XlsWorkbook_get_Charts, self.Ptr)
|
|
2141
|
-
ret = None if intPtr==None else
|
|
2162
|
+
ret = None if intPtr==None else XlsChartsCollection(intPtr)
|
|
2142
2163
|
return ret
|
|
2143
2164
|
|
|
2144
2165
|
|