Skip to content

Commit 6621f14

Browse files
committed
20230420 update: add test data and xml controller.
1 parent 31e7800 commit 6621f14

File tree

12 files changed

+690
-2
lines changed

12 files changed

+690
-2
lines changed

TestCellsCloudSDK.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
python .\test\tests_auto_filter_controller.py
2+
python .\test\tests_batch_controller.py
3+
python .\test\tests_cells_barcodes_controller.py
4+
python .\test\tests_cells_controller.py
5+
python .\test\tests_cells_status_controller.py
6+
python .\test\tests_chart_area_controller.py
7+
python .\test\tests_charts_controller.py
8+
python .\test\tests_conditional_formattings_controller.py
9+
python .\test\tests_conversion_json.py
10+
python .\test\tests_conversion_png.py
11+
python .\test\tests_conversion.py
12+
python .\test\tests_file_controller.py
13+
python .\test\tests_folder_controller.py
14+
python .\test\tests_hypelinks_controller.py
15+
python .\test\tests_light_cells.py
16+
python .\test\tests_list_objects_controller.py
17+
python .\test\tests_ole_objects_controller.py
18+
python .\test\tests_one.py
19+
python .\test\tests_page_breaks_controller.py
20+
python .\test\tests_page_setup_controller.py
21+
python .\test\tests_pictures_controller.py
22+
python .\test\tests_pivot_tables_controller.py
23+
python .\test\tests_properties_controller.py
24+
python .\test\tests_ranges_controller.py
25+
python .\test\tests_shapes_controller.py
26+
python .\test\tests_sparkline_groups_controller.py
27+
python .\test\tests_storage_controller.py
28+
python .\test\tests_workbook_controller.py
29+
python .\test\tests_worksheet_controller.py
30+
python .\test\tests_worksheet_validations_controller.py

TestData/Template.xlsx

9.58 KB
Binary file not shown.

TestData/data.xml

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

asposecellscloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@
287287
from .models.ole_object import OleObject
288288
from .models.picture import Picture
289289
from .models.title import Title
290+
from .models.import_position import ImportPosition
291+
from .models.import_xml_request import ImportXMLRequest
290292

291293
# import apis into sdk package
292294
from .apis.cells_api import CellsApi

asposecellscloud/apis/cells_api.py

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14178,6 +14178,97 @@ def delete_worksheet_validations_with_http_info(self, request, **kwargs):
1417814178
collection_formats=http_params['collection_formats'])
1417914179

1418014180

14181+
# <summary>
14182+
# </summary>
14183+
# <param name="request">Request. <see cref="PostWorkbookExportXMLRequest" /></param>
14184+
def post_workbook_export_xml(self, request, **kwargs):
14185+
14186+
kwargs['_return_http_data_only'] = True
14187+
self.check_access_token()
14188+
if kwargs.get('callback'):
14189+
return self.post_workbook_export_xml_with_http_info(request,**kwargs)
14190+
else:
14191+
(data) = self.post_workbook_export_xml_with_http_info(request,**kwargs)
14192+
return data
14193+
14194+
def post_workbook_export_xml_with_http_info(self, request, **kwargs):
14195+
all_params = []
14196+
all_params.append('callback')
14197+
all_params.append('_return_http_data_only')
14198+
all_params.append('_preload_content')
14199+
all_params.append('_request_timeout')
14200+
params = locals()
14201+
for key, val in iteritems(params['kwargs']):
14202+
if key not in all_params:
14203+
raise TypeError(
14204+
"Got an unexpected keyword argument '%s'"
14205+
" to method post_workbook_export_xml" % key
14206+
)
14207+
params[key] = val
14208+
del params['kwargs']
14209+
14210+
http_params = request.create_http_request(self.api_client)
14211+
return self.api_client.call_api(http_params['path'], http_params['method'],
14212+
None,
14213+
http_params['query_params'],
14214+
http_params['header_params'],
14215+
body=http_params['body'],
14216+
post_params=http_params['form_params'],
14217+
files=http_params['files'],
14218+
response_type=http_params['response_type'],
14219+
auth_settings=http_params['auth_settings'],
14220+
callback=params.get('callback'),
14221+
_return_http_data_only=params.get('_return_http_data_only'),
14222+
_preload_content=params.get('_preload_content', True),
14223+
_request_timeout=params.get('_request_timeout'),
14224+
collection_formats=http_params['collection_formats'])
14225+
14226+
14227+
14228+
# <summary>
14229+
# </summary>
14230+
# <param name="request">Request. <see cref="PostWorkbookImportXMLRequest" /></param>
14231+
def post_workbook_import_xml(self, request, **kwargs):
14232+
14233+
kwargs['_return_http_data_only'] = True
14234+
self.check_access_token()
14235+
if kwargs.get('callback'):
14236+
return self.post_workbook_import_xml_with_http_info(request,**kwargs)
14237+
else:
14238+
(data) = self.post_workbook_import_xml_with_http_info(request,**kwargs)
14239+
return data
14240+
14241+
def post_workbook_import_xml_with_http_info(self, request, **kwargs):
14242+
all_params = []
14243+
all_params.append('callback')
14244+
all_params.append('_return_http_data_only')
14245+
all_params.append('_preload_content')
14246+
all_params.append('_request_timeout')
14247+
params = locals()
14248+
for key, val in iteritems(params['kwargs']):
14249+
if key not in all_params:
14250+
raise TypeError(
14251+
"Got an unexpected keyword argument '%s'"
14252+
" to method post_workbook_import_xml" % key
14253+
)
14254+
params[key] = val
14255+
del params['kwargs']
14256+
14257+
http_params = request.create_http_request(self.api_client)
14258+
return self.api_client.call_api(http_params['path'], http_params['method'],
14259+
None,
14260+
http_params['query_params'],
14261+
http_params['header_params'],
14262+
body=http_params['body'],
14263+
post_params=http_params['form_params'],
14264+
files=http_params['files'],
14265+
response_type=http_params['response_type'],
14266+
auth_settings=http_params['auth_settings'],
14267+
callback=params.get('callback'),
14268+
_return_http_data_only=params.get('_return_http_data_only'),
14269+
_preload_content=params.get('_preload_content', True),
14270+
_request_timeout=params.get('_request_timeout'),
14271+
collection_formats=http_params['collection_formats'])
1418114272

1418214273
# <summary>
1418314274
# </summary>

asposecellscloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,6 @@ def to_debug_report(self):
254254
return "Python SDK Debug Report:\n"\
255255
"OS: {env}\n"\
256256
"Python Version: {pyversion}\n"\
257-
"Version of the API: 22.3\n"\
258-
"SDK Package Version: 22.12".\
257+
"Version of the API: v3.0\n"\
258+
"SDK Package Version: 23.4".\
259259
format(env=sys.platform, pyversion=sys.version)

asposecellscloud/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,5 @@
287287
from .ole_object import OleObject
288288
from .picture import Picture
289289
from .title import Title
290+
from .import_position import ImportPosition
291+
from .import_xml_request import ImportXMLRequest
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# coding: utf-8
2+
"""
3+
<copyright company="Aspose" file="ImportPositionpy.cs">
4+
Copyright (c) 2023 Aspose.Cells Cloud
5+
</copyright>
6+
<summary>
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.
24+
</summary>
25+
"""
26+
27+
from pprint import pformat
28+
from six import iteritems
29+
import re
30+
31+
class ImportPosition(object):
32+
33+
"""
34+
NOTE: This class is auto generated by the swagger code generator program.
35+
Do not edit the class manually.
36+
"""
37+
38+
39+
"""
40+
Attributes:
41+
swagger_types (dict): The key is attribute name
42+
and the value is attribute type.
43+
attribute_map (dict): The key is attribute name
44+
and the value is json key in definition.
45+
"""
46+
47+
swagger_types = {
48+
'sheet_name' : 'str',
49+
'row_index' : 'int',
50+
'column_index' : 'int'
51+
}
52+
53+
attribute_map = {
54+
'sheet_name' : 'SheetName' ,
55+
'row_index' : 'RowIndex' ,
56+
'column_index' : 'ColumnIndex'
57+
}
58+
59+
@staticmethod
60+
def get_swagger_types():
61+
return ImportPosition.swagger_types
62+
63+
@staticmethod
64+
def get_attribute_map():
65+
return ImportPosition.attribute_map
66+
67+
def get_from_container(self, attr):
68+
if attr in self.container:
69+
return self.container[attr]
70+
return None
71+
72+
def __init__(self,sheet_name=None ,row_index=None ,column_index=None ,**kw):
73+
"""
74+
Associative dict for storing property values
75+
"""
76+
self.container = {}
77+
78+
"""
79+
ImportPosition - a model defined in Swagger
80+
"""
81+
self.container['sheet_name'] = None
82+
self.container['row_index'] = None
83+
self.container['column_index'] = None
84+
params = locals()
85+
self.sheet_name = sheet_name
86+
if 'sheet_name' in params:
87+
self.sheet_name = params["sheet_name"]
88+
89+
90+
91+
self.row_index = row_index
92+
if 'row_index' in params:
93+
self.row_index = params["row_index"]
94+
95+
96+
97+
self.column_index = column_index
98+
if 'column_index' in params:
99+
self.column_index = params["column_index"]
100+
101+
102+
103+
104+
@property
105+
def sheet_name(self):
106+
return self.container['sheet_name']
107+
108+
@sheet_name.setter
109+
def sheet_name(self, sheet_name):
110+
self.container['sheet_name'] = sheet_name
111+
@property
112+
def row_index(self):
113+
return self.container['row_index']
114+
115+
@row_index.setter
116+
def row_index(self, row_index):
117+
self.container['row_index'] = row_index
118+
@property
119+
def column_index(self):
120+
return self.container['column_index']
121+
122+
@column_index.setter
123+
def column_index(self, column_index):
124+
self.container['column_index'] = column_index
125+
126+
def to_dict(self):
127+
"""
128+
Returns the model properties as a dict
129+
"""
130+
result = {}
131+
132+
for attr, _ in iteritems(self.get_swagger_types()):
133+
value = self.get_from_container(attr)
134+
if isinstance(value, list):
135+
result[attr] = list(map(
136+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
137+
value
138+
))
139+
elif hasattr(value, "to_dict"):
140+
result[attr] = value.to_dict()
141+
elif isinstance(value, dict):
142+
result[attr] = dict(map(
143+
lambda item: (item[0], item[1].to_dict())
144+
if hasattr(item[1], "to_dict") else item,
145+
value.items()
146+
))
147+
else:
148+
result[attr] = value
149+
150+
return result
151+
152+
def to_str(self):
153+
"""
154+
Returns the string representation of the model
155+
"""
156+
return pformat(self.to_dict())
157+
158+
def __repr__(self):
159+
"""
160+
For `print` and `pprint`
161+
"""
162+
return self.to_str()
163+
164+
def __eq__(self, other):
165+
"""
166+
Returns true if both objects are equal
167+
"""
168+
if not isinstance(other, ImportPosition):
169+
return False
170+
171+
return self.__dict__ == other.__dict__
172+
173+
def __ne__(self, other):
174+
"""
175+
Returns true if both objects are not equal
176+
"""
177+
return not self == other

0 commit comments

Comments
 (0)