aspose_cells_cloud 1.0.7 → 1.0.8
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.
- checksums.yaml +4 -4
- data/lib/aspose_cells_cloud/api/cells_api.rb +239 -0
- data/lib/aspose_cells_cloud/models/chart.rb +373 -0
- data/lib/aspose_cells_cloud/models/font_setting.rb +53 -0
- data/lib/aspose_cells_cloud/models/sort_key.rb +11 -3
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +2 -1
- data/test/cells_tests.rb +82 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e57bb15fc0c1f78339167c09baf38b566751c56
|
4
|
+
data.tar.gz: de75e35aba3bde7e483e0486ef74a9525629c0db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27b32432cf01a63b6d607e45e6c8f78886ba42d886d28e236f6c8e52aadb642a54563083543327f69a4db0fed7000fafc3269ef640eaff331e84acdc6c4cb734
|
7
|
+
data.tar.gz: 0e876e1d32644ea88789f340acbf1cca5bee87cb211e8a909f216ba20388144baae48b0bfd19f00768787ab146398e7fac20f9b1a18f47bc8b6605cb4c18712a
|
@@ -11179,5 +11179,244 @@ module AsposeCellsCloud
|
|
11179
11179
|
end
|
11180
11180
|
return result
|
11181
11181
|
end
|
11182
|
+
|
11183
|
+
# Rich text formatting in a single cell.
|
11184
|
+
#
|
11185
|
+
# @param name
|
11186
|
+
# @param sheet_name
|
11187
|
+
# @param cell_name
|
11188
|
+
# @param options
|
11189
|
+
# @param [Hash] opts the optional parameters
|
11190
|
+
# @option opts [String] :folder
|
11191
|
+
# @return [BaseResponse]
|
11192
|
+
def post_cell_text_formatting(name, sheet_name, cell_name, options, opts = {})
|
11193
|
+
|
11194
|
+
if Configuration.debugging
|
11195
|
+
Configuration.logger.debug "Calling API: CellsApi#post_cell_text_formatting ..."
|
11196
|
+
end
|
11197
|
+
|
11198
|
+
# verify the required parameter 'name' is set
|
11199
|
+
fail "Missing the required parameter 'name' when calling post_cell_text_formatting" if name.nil?
|
11200
|
+
|
11201
|
+
# verify the required parameter 'sheet_name' is set
|
11202
|
+
fail "Missing the required parameter 'sheet_name' when calling post_cell_text_formatting" if sheet_name.nil?
|
11203
|
+
|
11204
|
+
# verify the required parameter 'cell_name' is set
|
11205
|
+
fail "Missing the required parameter 'cell_name' when calling post_cell_text_formatting" if cell_name.nil?
|
11206
|
+
|
11207
|
+
# verify the required parameter 'options' is set
|
11208
|
+
fail "Missing the required parameter 'options' when calling post_cell_text_formatting" if options.nil?
|
11209
|
+
|
11210
|
+
# resource path
|
11211
|
+
path = "/cells/{name}/worksheets/{sheetName}/cells/{cellName}/characters".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s).sub('{' + 'cellName' + '}', cell_name.to_s)
|
11212
|
+
|
11213
|
+
# query parameters
|
11214
|
+
query_params = {}
|
11215
|
+
query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
|
11216
|
+
|
11217
|
+
# header parameters
|
11218
|
+
header_params = {}
|
11219
|
+
|
11220
|
+
# HTTP header 'Accept' (if needed)
|
11221
|
+
_header_accept = ['application/json']
|
11222
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
11223
|
+
|
11224
|
+
# HTTP header 'Content-Type'
|
11225
|
+
_header_content_type = ['application/json']
|
11226
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
11227
|
+
|
11228
|
+
# form parameters
|
11229
|
+
form_params = {}
|
11230
|
+
|
11231
|
+
# http body (model)
|
11232
|
+
post_body = @api_client.object_to_http_body(options)
|
11233
|
+
|
11234
|
+
|
11235
|
+
auth_names = []
|
11236
|
+
result = @api_client.call_api(:POST, path, :query_params => query_params, :header_params => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BaseResponse')
|
11237
|
+
if Configuration.debugging
|
11238
|
+
Configuration.logger.debug "API called: CellsApi#post_cell_text_formatting. Result: #{result.inspect}"
|
11239
|
+
end
|
11240
|
+
return result
|
11241
|
+
end
|
11242
|
+
|
11243
|
+
# Sort table's data.
|
11244
|
+
#
|
11245
|
+
# @param name
|
11246
|
+
# @param sheet_name
|
11247
|
+
# @param list_object_index
|
11248
|
+
# @param data_sorter
|
11249
|
+
# @param [Hash] opts the optional parameters
|
11250
|
+
# @option opts [String] :folder
|
11251
|
+
# @return [BaseResponse]
|
11252
|
+
def post_sort_table_data(name, sheet_name, list_object_index, data_sorter, opts = {})
|
11253
|
+
if Configuration.debugging
|
11254
|
+
Configuration.debugging "Calling API: CellsApi#post_sort_table_data ..."
|
11255
|
+
end
|
11256
|
+
|
11257
|
+
# verify the required parameter 'name' is set
|
11258
|
+
fail "Missing the required parameter 'name' when calling post_sort_table_data" if name.nil?
|
11259
|
+
|
11260
|
+
# verify the required parameter 'sheet_name' is set
|
11261
|
+
fail "Missing the required parameter 'sheet_name' when calling post_sort_table_data" if sheet_name.nil?
|
11262
|
+
|
11263
|
+
# verify the required parameter 'list_object_index' is set
|
11264
|
+
fail "Missing the required parameter 'list_object_index' when calling post_sort_table_data" if list_object_index.nil?
|
11265
|
+
|
11266
|
+
# verify the required parameter 'data_sorter' is set
|
11267
|
+
fail "Missing the required parameter 'data_sorter' when calling post_sort_table_data" if data_sorter.nil?
|
11268
|
+
|
11269
|
+
# resource path
|
11270
|
+
path = "/cells/{name}/worksheets/{sheetName}/listobjects/{listObjectIndex}/sort".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s).sub('{' + 'listObjectIndex' + '}', list_object_index.to_s)
|
11271
|
+
|
11272
|
+
# query parameters
|
11273
|
+
query_params = {}
|
11274
|
+
query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
|
11275
|
+
|
11276
|
+
# header parameters
|
11277
|
+
header_params = {}
|
11278
|
+
|
11279
|
+
# HTTP header 'Accept' (if needed)
|
11280
|
+
_header_accept = ['application/json']
|
11281
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
11282
|
+
|
11283
|
+
# HTTP header 'Content-Type'
|
11284
|
+
_header_content_type = ['application/json']
|
11285
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
11286
|
+
|
11287
|
+
# form parameters
|
11288
|
+
form_params = {}
|
11289
|
+
|
11290
|
+
# http body (model)
|
11291
|
+
post_body = @api_client.object_to_http_body(data_sorter)
|
11292
|
+
|
11293
|
+
|
11294
|
+
auth_names = []
|
11295
|
+
result = @api_client.call_api(:POST, path, :query_params => query_params, :header_params => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BaseResponse')
|
11296
|
+
if Configuration.debugging
|
11297
|
+
Configuration.logger.debug "API called: CellsApi#post_sort_table_data. Result: #{result.inspect}"
|
11298
|
+
end
|
11299
|
+
return result
|
11300
|
+
end
|
11301
|
+
|
11302
|
+
# Calculate cell's formula.
|
11303
|
+
#
|
11304
|
+
# @param name
|
11305
|
+
# @param sheet_name
|
11306
|
+
# @param cell_name
|
11307
|
+
# @param options
|
11308
|
+
# @param [Hash] opts the optional parameters
|
11309
|
+
# @option opts [String] :folder
|
11310
|
+
# @return [BaseResponse]
|
11311
|
+
def post_calulate_cell_formula(name, sheet_name, cell_name, options, opts = {})
|
11312
|
+
if Configuration.debugging
|
11313
|
+
Configuration.debugging "Calling API: CellsApi#post_calulate_cell_formula ..."
|
11314
|
+
end
|
11315
|
+
|
11316
|
+
# verify the required parameter 'name' is set
|
11317
|
+
fail "Missing the required parameter 'name' when calling post_calulate_cell_formula" if name.nil?
|
11318
|
+
|
11319
|
+
# verify the required parameter 'sheet_name' is set
|
11320
|
+
fail "Missing the required parameter 'sheet_name' when calling post_calulate_cell_formula" if sheet_name.nil?
|
11321
|
+
|
11322
|
+
# verify the required parameter 'cell_name' is set
|
11323
|
+
fail "Missing the required parameter 'cell_name' when calling post_calulate_cell_formula" if cell_name.nil?
|
11324
|
+
|
11325
|
+
# verify the required parameter 'options' is set
|
11326
|
+
fail "Missing the required parameter 'options' when calling post_calulate_cell_formula" if options.nil?
|
11327
|
+
|
11328
|
+
# resource path
|
11329
|
+
path = "/cells/{name}/worksheets/{sheetName}/cells/{cellName}/calculate".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s).sub('{' + 'cellName' + '}', cell_name.to_s)
|
11330
|
+
|
11331
|
+
# query parameters
|
11332
|
+
query_params = {}
|
11333
|
+
query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
|
11334
|
+
|
11335
|
+
# header parameters
|
11336
|
+
header_params = {}
|
11337
|
+
|
11338
|
+
# HTTP header 'Accept' (if needed)
|
11339
|
+
_header_accept = ['application/json']
|
11340
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
11341
|
+
|
11342
|
+
# HTTP header 'Content-Type'
|
11343
|
+
_header_content_type = ['application/json']
|
11344
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
11345
|
+
|
11346
|
+
# form parameters
|
11347
|
+
form_params = {}
|
11348
|
+
|
11349
|
+
# http body (model)
|
11350
|
+
post_body = @api_client.object_to_http_body(options)
|
11351
|
+
|
11352
|
+
|
11353
|
+
auth_names = []
|
11354
|
+
result = @api_client.call_api(:POST, path, :query_params => query_params, :header_params => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BaseResponse')
|
11355
|
+
if Configuration.debugging
|
11356
|
+
Configuration.logger.debug "API called: CellsApi#post_calulate_cell_formula. Result: #{result.inspect}"
|
11357
|
+
end
|
11358
|
+
return result
|
11359
|
+
end
|
11360
|
+
|
11361
|
+
# Update chart propreties
|
11362
|
+
#
|
11363
|
+
# @param name Workbook name.
|
11364
|
+
# @param sheet_name Worksheet name.
|
11365
|
+
# @param chart_index The chart index.
|
11366
|
+
# @param chart
|
11367
|
+
# @param [Hash] opts the optional parameters
|
11368
|
+
# @option opts [String] :storage Workbook storage.
|
11369
|
+
# @option opts [String] :folder The workbook folder.
|
11370
|
+
# @return [BaseResponse]
|
11371
|
+
def cells_charts_post_worksheet_chart(name, sheet_name, chart_index, chart, opts = {})
|
11372
|
+
if Configuration.debugging
|
11373
|
+
Configuration.debugging "Calling API: CellsApi#cells_charts_post_worksheet_chart ..."
|
11374
|
+
end
|
11375
|
+
|
11376
|
+
# verify the required parameter 'name' is set
|
11377
|
+
fail "Missing the required parameter 'name' when calling cells_charts_post_worksheet_chart" if name.nil?
|
11378
|
+
|
11379
|
+
# verify the required parameter 'sheet_name' is set
|
11380
|
+
fail "Missing the required parameter 'sheet_name' when calling cells_charts_post_worksheet_chart" if sheet_name.nil?
|
11381
|
+
|
11382
|
+
# verify the required parameter 'chart_index' is set
|
11383
|
+
fail "Missing the required parameter 'chart_index' when calling cells_charts_post_worksheet_chart" if chart_index.nil?
|
11384
|
+
|
11385
|
+
# verify the required parameter 'chart' is set
|
11386
|
+
fail "Missing the required parameter 'chart' when calling cells_charts_post_worksheet_chart" if chart.nil?
|
11387
|
+
|
11388
|
+
# resource path
|
11389
|
+
path = "/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s).sub('{' + 'chartIndex' + '}', chart_index.to_s)
|
11390
|
+
|
11391
|
+
# query parameters
|
11392
|
+
query_params = {}
|
11393
|
+
query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
|
11394
|
+
query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
|
11395
|
+
|
11396
|
+
# header parameters
|
11397
|
+
header_params = {}
|
11398
|
+
|
11399
|
+
# HTTP header 'Accept' (if needed)
|
11400
|
+
_header_accept = ['application/json']
|
11401
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
11402
|
+
|
11403
|
+
# HTTP header 'Content-Type'
|
11404
|
+
_header_content_type = ['application/json']
|
11405
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
11406
|
+
|
11407
|
+
# form parameters
|
11408
|
+
form_params = {}
|
11409
|
+
|
11410
|
+
# http body (model)
|
11411
|
+
post_body = @api_client.object_to_http_body(chart)
|
11412
|
+
|
11413
|
+
|
11414
|
+
auth_names = []
|
11415
|
+
result = @api_client.call_api(:POST, path, :query_params => query_params, :header_params => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BaseResponse')
|
11416
|
+
if Configuration.debugging
|
11417
|
+
Configuration.logger.debug "API called: CellsApi#cells_charts_post_worksheet_chart. Result: #{result.inspect}"
|
11418
|
+
end
|
11419
|
+
return result
|
11420
|
+
end
|
11182
11421
|
end
|
11183
11422
|
end
|
@@ -0,0 +1,373 @@
|
|
1
|
+
module AsposeCellsCloud
|
2
|
+
#
|
3
|
+
class Chart < BaseObject
|
4
|
+
attr_accessor :auto_scaling, :back_wall, :category_axis, :chart_area, :chart_data_table, :chart_object, :depth_percent, :elevation, :first_slice_angle, :floor, :gap_depth, :gap_width, :height_percent, :hide_pivot_field_buttons, :is3_d, :is_rectangular_cornered, :legend, :name, :n_series, :page_setup, :perspective, :pivot_source, :placement, :plot_area, :plot_empty_cells_type, :plot_visible_cells, :print_size, :right_angle_axes, :rotation_angle, :second_category_axis, :second_value_axis, :series_axis, :shapes, :show_data_table, :show_legend, :side_wall, :size_with_window, :style, :title, :type, :value_axis, :walls, :walls_and_gridlines2_d
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True.
|
10
|
+
:'auto_scaling' => :'AutoScaling',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'back_wall' => :'BackWall',
|
14
|
+
|
15
|
+
# Gets the chart's X axis. The property is read only
|
16
|
+
:'category_axis' => :'CategoryAxis',
|
17
|
+
|
18
|
+
# Gets the chart area in the worksheet
|
19
|
+
:'chart_area' => :'ChartArea',
|
20
|
+
|
21
|
+
# Represents the chart data table.
|
22
|
+
:'chart_data_table' => :'ChartDataTable',
|
23
|
+
|
24
|
+
# Represents the chartShape;
|
25
|
+
:'chart_object' => :'ChartObject',
|
26
|
+
|
27
|
+
# Represents the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).
|
28
|
+
:'depth_percent' => :'DepthPercent',
|
29
|
+
|
30
|
+
# Represents the elevation of the 3-D chart view, in degrees.
|
31
|
+
:'elevation' => :'Elevation',
|
32
|
+
|
33
|
+
# Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360.
|
34
|
+
:'first_slice_angle' => :'FirstSliceAngle',
|
35
|
+
|
36
|
+
# Returns a Floor object that represents the walls of a 3-D chart.\n
|
37
|
+
:'floor' => :'Floor',
|
38
|
+
|
39
|
+
# Gets or sets the distance between the data series in a 3-D chart, as a percentage of the marker width.The value of this property must be between 0 and 500.
|
40
|
+
:'gap_depth' => :'GapDepth',
|
41
|
+
|
42
|
+
# Returns or sets the space between bar or column clusters, as a percentage of the bar or column width. The value of this property must be between 0 and 500.\n
|
43
|
+
:'gap_width' => :'GapWidth',
|
44
|
+
|
45
|
+
# Returns or sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).
|
46
|
+
:'height_percent' => :'HeightPercent',
|
47
|
+
|
48
|
+
# Indicates whether hide the pivot chart field buttons only when the chart is PivotChart
|
49
|
+
:'hide_pivot_field_buttons' => :'HidePivotFieldButtons',
|
50
|
+
|
51
|
+
# Indicates whether the chart is a 3d chart.
|
52
|
+
:'is3_d' => :'Is3D',
|
53
|
+
|
54
|
+
# Gets or sets a value indicating whether the chart displays a data table.
|
55
|
+
:'is_rectangular_cornered' => :'IsRectangularCornered',
|
56
|
+
|
57
|
+
# Gets the chart legend.
|
58
|
+
:'legend' => :'Legend',
|
59
|
+
|
60
|
+
# Gets and sets the name of the chart.
|
61
|
+
:'name' => :'Name',
|
62
|
+
|
63
|
+
# Gets a SeriesCollection collection representing the data series in the chart.
|
64
|
+
:'n_series' => :'NSeries',
|
65
|
+
|
66
|
+
# Represents the page setup description in this chart.
|
67
|
+
:'page_setup' => :'PageSetup',
|
68
|
+
|
69
|
+
# Returns or sets the perspective for the 3-D chart view. Must be between 0 and 100.This property is ignored if the RightAngleAxes property is True.
|
70
|
+
:'perspective' => :'Perspective',
|
71
|
+
|
72
|
+
# The source is the data of the pivotTable.If PivotSource is not empty ,the chart is PivotChart.
|
73
|
+
:'pivot_source' => :'PivotSource',
|
74
|
+
|
75
|
+
# Represents the way the chart is attached to the cells below it.
|
76
|
+
:'placement' => :'Placement',
|
77
|
+
|
78
|
+
# Gets the chart's plot area which includes axis tick lables.
|
79
|
+
:'plot_area' => :'PlotArea',
|
80
|
+
|
81
|
+
# Gets and sets how to plot the empty cells.
|
82
|
+
:'plot_empty_cells_type' => :'PlotEmptyCellsType',
|
83
|
+
|
84
|
+
# Indicates whether only plot visible cells.
|
85
|
+
:'plot_visible_cells' => :'PlotVisibleCells',
|
86
|
+
|
87
|
+
# Gets and sets the printed chart size.
|
88
|
+
:'print_size' => :'PrintSize',
|
89
|
+
|
90
|
+
# True if the chart axes are at right angles.Applies only for 3-D charts(except Column3D and 3-D Pie Charts).
|
91
|
+
:'right_angle_axes' => :'RightAngleAxes',
|
92
|
+
|
93
|
+
# Represents the rotation of the 3-D chart view (the rotation of the plot area around the z-axis, in degrees).
|
94
|
+
:'rotation_angle' => :'RotationAngle',
|
95
|
+
|
96
|
+
# Gets the chart's second X axis.
|
97
|
+
:'second_category_axis' => :'SecondCategoryAxis',
|
98
|
+
|
99
|
+
# Gets the chart's second Y axis.
|
100
|
+
:'second_value_axis' => :'SecondValueAxis',
|
101
|
+
|
102
|
+
# Gets the chart's series axis.
|
103
|
+
:'series_axis' => :'SeriesAxis',
|
104
|
+
|
105
|
+
# Returns all drawing shapes in this chart.
|
106
|
+
:'shapes' => :'Shapes',
|
107
|
+
|
108
|
+
# Gets or sets a value indicating whether the chart displays a data table.
|
109
|
+
:'show_data_table' => :'ShowDataTable',
|
110
|
+
|
111
|
+
# Gets or sets a value indicating whether the chart legend will be displayed. Default is true.
|
112
|
+
:'show_legend' => :'ShowLegend',
|
113
|
+
|
114
|
+
#
|
115
|
+
:'side_wall' => :'SideWall',
|
116
|
+
|
117
|
+
# True if Microsoft Excel resizes the chart to match the size of the chart sheet window.
|
118
|
+
:'size_with_window' => :'SizeWithWindow',
|
119
|
+
|
120
|
+
# Gets and sets the builtin style.
|
121
|
+
:'style' => :'Style',
|
122
|
+
|
123
|
+
# Gets the chart's title.
|
124
|
+
:'title' => :'Title',
|
125
|
+
|
126
|
+
# Gets or sets a chart's type.
|
127
|
+
:'type' => :'Type',
|
128
|
+
|
129
|
+
# Gets the chart's Y axis.
|
130
|
+
:'value_axis' => :'ValueAxis',
|
131
|
+
|
132
|
+
# Returns a Walls object that represents the walls of a 3-D chart.
|
133
|
+
:'walls' => :'Walls',
|
134
|
+
|
135
|
+
# True if gridlines are drawn two-dimensionally on a 3-D chart.
|
136
|
+
:'walls_and_gridlines2_d' => :'WallsAndGridlines2D'
|
137
|
+
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
141
|
+
# attribute type
|
142
|
+
def self.swagger_types
|
143
|
+
{
|
144
|
+
:'auto_scaling' => :'BOOLEAN',
|
145
|
+
:'back_wall' => :'LinkElement',
|
146
|
+
:'category_axis' => :'LinkElement',
|
147
|
+
:'chart_area' => :'LinkElement',
|
148
|
+
:'chart_data_table' => :'LinkElement',
|
149
|
+
:'chart_object' => :'LinkElement',
|
150
|
+
:'depth_percent' => :'Integer',
|
151
|
+
:'elevation' => :'Integer',
|
152
|
+
:'first_slice_angle' => :'Integer',
|
153
|
+
:'floor' => :'LinkElement',
|
154
|
+
:'gap_depth' => :'Integer',
|
155
|
+
:'gap_width' => :'Integer',
|
156
|
+
:'height_percent' => :'Integer',
|
157
|
+
:'hide_pivot_field_buttons' => :'BOOLEAN',
|
158
|
+
:'is3_d' => :'BOOLEAN',
|
159
|
+
:'is_rectangular_cornered' => :'BOOLEAN',
|
160
|
+
:'legend' => :'LinkElement',
|
161
|
+
:'name' => :'String',
|
162
|
+
:'n_series' => :'LinkElement',
|
163
|
+
:'page_setup' => :'LinkElement',
|
164
|
+
:'perspective' => :'Integer',
|
165
|
+
:'pivot_source' => :'String',
|
166
|
+
:'placement' => :'String',
|
167
|
+
:'plot_area' => :'LinkElement',
|
168
|
+
:'plot_empty_cells_type' => :'String',
|
169
|
+
:'plot_visible_cells' => :'BOOLEAN',
|
170
|
+
:'print_size' => :'String',
|
171
|
+
:'right_angle_axes' => :'BOOLEAN',
|
172
|
+
:'rotation_angle' => :'Integer',
|
173
|
+
:'second_category_axis' => :'LinkElement',
|
174
|
+
:'second_value_axis' => :'LinkElement',
|
175
|
+
:'series_axis' => :'LinkElement',
|
176
|
+
:'shapes' => :'LinkElement',
|
177
|
+
:'show_data_table' => :'BOOLEAN',
|
178
|
+
:'show_legend' => :'BOOLEAN',
|
179
|
+
:'side_wall' => :'LinkElement',
|
180
|
+
:'size_with_window' => :'BOOLEAN',
|
181
|
+
:'style' => :'Integer',
|
182
|
+
:'title' => :'LinkElement',
|
183
|
+
:'type' => :'String',
|
184
|
+
:'value_axis' => :'LinkElement',
|
185
|
+
:'walls' => :'LinkElement',
|
186
|
+
:'walls_and_gridlines2_d' => :'BOOLEAN'
|
187
|
+
|
188
|
+
}
|
189
|
+
end
|
190
|
+
|
191
|
+
def initialize(attributes = {})
|
192
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
193
|
+
|
194
|
+
# convert string to symbol for hash key
|
195
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
196
|
+
|
197
|
+
|
198
|
+
if attributes[:'AutoScaling']
|
199
|
+
self.auto_scaling = attributes[:'AutoScaling']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes[:'BackWall']
|
203
|
+
self.back_wall = attributes[:'BackWall']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes[:'CategoryAxis']
|
207
|
+
self.category_axis = attributes[:'CategoryAxis']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes[:'ChartArea']
|
211
|
+
self.chart_area = attributes[:'ChartArea']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes[:'ChartDataTable']
|
215
|
+
self.chart_data_table = attributes[:'ChartDataTable']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes[:'ChartObject']
|
219
|
+
self.chart_object = attributes[:'ChartObject']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes[:'DepthPercent']
|
223
|
+
self.depth_percent = attributes[:'DepthPercent']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes[:'Elevation']
|
227
|
+
self.elevation = attributes[:'Elevation']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes[:'FirstSliceAngle']
|
231
|
+
self.first_slice_angle = attributes[:'FirstSliceAngle']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes[:'Floor']
|
235
|
+
self.floor = attributes[:'Floor']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes[:'GapDepth']
|
239
|
+
self.gap_depth = attributes[:'GapDepth']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes[:'GapWidth']
|
243
|
+
self.gap_width = attributes[:'GapWidth']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes[:'HeightPercent']
|
247
|
+
self.height_percent = attributes[:'HeightPercent']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes[:'HidePivotFieldButtons']
|
251
|
+
self.hide_pivot_field_buttons = attributes[:'HidePivotFieldButtons']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes[:'Is3D']
|
255
|
+
self.is3_d = attributes[:'Is3D']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes[:'IsRectangularCornered']
|
259
|
+
self.is_rectangular_cornered = attributes[:'IsRectangularCornered']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes[:'Legend']
|
263
|
+
self.legend = attributes[:'Legend']
|
264
|
+
end
|
265
|
+
|
266
|
+
if attributes[:'Name']
|
267
|
+
self.name = attributes[:'Name']
|
268
|
+
end
|
269
|
+
|
270
|
+
if attributes[:'NSeries']
|
271
|
+
self.n_series = attributes[:'NSeries']
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes[:'PageSetup']
|
275
|
+
self.page_setup = attributes[:'PageSetup']
|
276
|
+
end
|
277
|
+
|
278
|
+
if attributes[:'Perspective']
|
279
|
+
self.perspective = attributes[:'Perspective']
|
280
|
+
end
|
281
|
+
|
282
|
+
if attributes[:'PivotSource']
|
283
|
+
self.pivot_source = attributes[:'PivotSource']
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes[:'Placement']
|
287
|
+
self.placement = attributes[:'Placement']
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes[:'PlotArea']
|
291
|
+
self.plot_area = attributes[:'PlotArea']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes[:'PlotEmptyCellsType']
|
295
|
+
self.plot_empty_cells_type = attributes[:'PlotEmptyCellsType']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes[:'PlotVisibleCells']
|
299
|
+
self.plot_visible_cells = attributes[:'PlotVisibleCells']
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes[:'PrintSize']
|
303
|
+
self.print_size = attributes[:'PrintSize']
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes[:'RightAngleAxes']
|
307
|
+
self.right_angle_axes = attributes[:'RightAngleAxes']
|
308
|
+
end
|
309
|
+
|
310
|
+
if attributes[:'RotationAngle']
|
311
|
+
self.rotation_angle = attributes[:'RotationAngle']
|
312
|
+
end
|
313
|
+
|
314
|
+
if attributes[:'SecondCategoryAxis']
|
315
|
+
self.second_category_axis = attributes[:'SecondCategoryAxis']
|
316
|
+
end
|
317
|
+
|
318
|
+
if attributes[:'SecondValueAxis']
|
319
|
+
self.second_value_axis = attributes[:'SecondValueAxis']
|
320
|
+
end
|
321
|
+
|
322
|
+
if attributes[:'SeriesAxis']
|
323
|
+
self.series_axis = attributes[:'SeriesAxis']
|
324
|
+
end
|
325
|
+
|
326
|
+
if attributes[:'Shapes']
|
327
|
+
self.shapes = attributes[:'Shapes']
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes[:'ShowDataTable']
|
331
|
+
self.show_data_table = attributes[:'ShowDataTable']
|
332
|
+
end
|
333
|
+
|
334
|
+
if attributes[:'ShowLegend']
|
335
|
+
self.show_legend = attributes[:'ShowLegend']
|
336
|
+
end
|
337
|
+
|
338
|
+
if attributes[:'SideWall']
|
339
|
+
self.side_wall = attributes[:'SideWall']
|
340
|
+
end
|
341
|
+
|
342
|
+
if attributes[:'SizeWithWindow']
|
343
|
+
self.size_with_window = attributes[:'SizeWithWindow']
|
344
|
+
end
|
345
|
+
|
346
|
+
if attributes[:'Style']
|
347
|
+
self.style = attributes[:'Style']
|
348
|
+
end
|
349
|
+
|
350
|
+
if attributes[:'Title']
|
351
|
+
self.title = attributes[:'Title']
|
352
|
+
end
|
353
|
+
|
354
|
+
if attributes[:'Type']
|
355
|
+
self.type = attributes[:'Type']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes[:'ValueAxis']
|
359
|
+
self.value_axis = attributes[:'ValueAxis']
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes[:'Walls']
|
363
|
+
self.walls = attributes[:'Walls']
|
364
|
+
end
|
365
|
+
|
366
|
+
if attributes[:'WallsAndGridlines2D']
|
367
|
+
self.walls_and_gridlines2_d = attributes[:'WallsAndGridlines2D']
|
368
|
+
end
|
369
|
+
|
370
|
+
end
|
371
|
+
|
372
|
+
end
|
373
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module AsposeCellsCloud
|
2
|
+
#
|
3
|
+
class FontSetting < BaseObject
|
4
|
+
attr_accessor :font, :length, :start_index
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'font' => :'Font',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'length' => :'Length',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'start_index' => :'StartIndex'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'font' => :'Font',
|
25
|
+
:'length' => :'Integer',
|
26
|
+
:'start_index' => :'Integer'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'Font']
|
39
|
+
self.font = attributes[:'Font']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'Length']
|
43
|
+
self.length = attributes[:'Length']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'StartIndex']
|
47
|
+
self.start_index = attributes[:'StartIndex']
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module AsposeCellsCloud
|
2
2
|
#
|
3
3
|
class SortKey < BaseObject
|
4
|
-
attr_accessor :key, :sort_order
|
4
|
+
attr_accessor :key, :sort_order, :custom_list
|
5
5
|
# attribute mapping from ruby-style variable name to JSON key
|
6
6
|
def self.attribute_map
|
7
7
|
{
|
@@ -10,7 +10,10 @@ module AsposeCellsCloud
|
|
10
10
|
:'key' => :'Key',
|
11
11
|
|
12
12
|
#
|
13
|
-
:'sort_order' => :'SortOrder'
|
13
|
+
:'sort_order' => :'SortOrder',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'custom_list' => :'CustomList'
|
14
17
|
|
15
18
|
}
|
16
19
|
end
|
@@ -19,7 +22,8 @@ module AsposeCellsCloud
|
|
19
22
|
def self.swagger_types
|
20
23
|
{
|
21
24
|
:'key' => :'Integer',
|
22
|
-
:'sort_order' => :'String'
|
25
|
+
:'sort_order' => :'String',
|
26
|
+
:'custom_list' => :'String'
|
23
27
|
|
24
28
|
}
|
25
29
|
end
|
@@ -39,6 +43,10 @@ module AsposeCellsCloud
|
|
39
43
|
self.sort_order = attributes[:'SortOrder']
|
40
44
|
end
|
41
45
|
|
46
|
+
if attributes[:'CustomList']
|
47
|
+
self.custom_list = attributes[:'CustomList']
|
48
|
+
end
|
49
|
+
|
42
50
|
end
|
43
51
|
|
44
52
|
end
|
data/lib/aspose_cells_cloud.rb
CHANGED
@@ -153,7 +153,8 @@ require_relative 'aspose_cells_cloud/models/result_destination'
|
|
153
153
|
require_relative 'aspose_cells_cloud/models/auto_filter_response'
|
154
154
|
require_relative 'aspose_cells_cloud/models/color_filter_request'
|
155
155
|
require_relative 'aspose_cells_cloud/models/calculation_options'
|
156
|
-
|
156
|
+
require_relative 'aspose_cells_cloud/models/font_setting'
|
157
|
+
require_relative 'aspose_cells_cloud/models/chart'
|
157
158
|
|
158
159
|
# APIs
|
159
160
|
require_relative 'aspose_cells_cloud/api/cells_api'
|
data/test/cells_tests.rb
CHANGED
@@ -966,8 +966,8 @@ class CellsTests < Minitest::Test
|
|
966
966
|
file_name = "myWorkbook.xlsx"
|
967
967
|
upload_file(file_name)
|
968
968
|
|
969
|
-
|
970
|
-
|
969
|
+
sheet_name = "Sheet1"
|
970
|
+
cell_name = "A3"
|
971
971
|
response = @cells_api.post_worksheet_cell_set_value(file_name, sheet_name, cell_name, {value: "1234", type: "string", formula: "sum(a1,a2)"})
|
972
972
|
assert(response, message="Failed to set cell value")
|
973
973
|
end
|
@@ -2120,4 +2120,84 @@ class CellsTests < Minitest::Test
|
|
2120
2120
|
response = @cells_api.post_workbook_calculate_formula(file_name, calculation_options, ignore_error)
|
2121
2121
|
assert(response, message="Failed to calculate all formulas in workbook")
|
2122
2122
|
end
|
2123
|
+
|
2124
|
+
def test_post_cell_text_formatting
|
2125
|
+
file_name = "Book1.xlsx"
|
2126
|
+
upload_file(file_name)
|
2127
|
+
sheet_name = "sheet1"
|
2128
|
+
cell_name = "A1"
|
2129
|
+
|
2130
|
+
# Set cell value
|
2131
|
+
response = @cells_api.post_worksheet_cell_set_value(file_name, sheet_name, cell_name, {value: "121211212112", type: "string"})
|
2132
|
+
|
2133
|
+
fontSetting1 = FontSetting.new
|
2134
|
+
fontSetting1.length = 5
|
2135
|
+
fontSetting1.start_index = 0
|
2136
|
+
font1 = Font.new
|
2137
|
+
font1.is_bold = true
|
2138
|
+
font1.size = 24
|
2139
|
+
fontSetting1.font = font1
|
2140
|
+
|
2141
|
+
fontSetting2 = FontSetting.new
|
2142
|
+
fontSetting2.length = 4
|
2143
|
+
fontSetting2.start_index = 5
|
2144
|
+
font2 = Font.new
|
2145
|
+
font2.is_italic = true
|
2146
|
+
font2.size = 15
|
2147
|
+
fontSetting2.font = font2
|
2148
|
+
|
2149
|
+
options = [fontSetting1, fontSetting2]
|
2150
|
+
|
2151
|
+
# Rich text formatting in a single cell
|
2152
|
+
response = @cells_api.post_cell_text_formatting(file_name, sheet_name, cell_name, options, opts = {})
|
2153
|
+
assert(response, message="Failed to set rich text formatting in a single cell")
|
2154
|
+
end
|
2155
|
+
|
2156
|
+
def test_post_sort_table_data
|
2157
|
+
file_name = "Book1.xlsx"
|
2158
|
+
upload_file(file_name)
|
2159
|
+
|
2160
|
+
sheet_name = "sheet7"
|
2161
|
+
list_object_index = 1
|
2162
|
+
|
2163
|
+
data_sorter = DataSorter.new
|
2164
|
+
data_sorter.case_sensitive = true
|
2165
|
+
sort_key = SortKey.new
|
2166
|
+
sort_key.key = 1
|
2167
|
+
sort_key.sort_order = "Ascending"
|
2168
|
+
data_sorter.key_list = [sort_key]
|
2169
|
+
|
2170
|
+
response = @cells_api.post_sort_table_data(file_name, sheet_name, list_object_index, data_sorter, opts = {})
|
2171
|
+
assert(response, message="Failed to sort table's data")
|
2172
|
+
end
|
2173
|
+
|
2174
|
+
def test_post_calulate_cell_formula
|
2175
|
+
file_name = "Book1.xlsx"
|
2176
|
+
upload_file(file_name)
|
2177
|
+
sheet_name = "sheet1"
|
2178
|
+
cell_name = "A1"
|
2179
|
+
|
2180
|
+
# Set cell value
|
2181
|
+
response = @cells_api.post_worksheet_cell_set_value(file_name, sheet_name, cell_name, {formula: "NOW()"})
|
2182
|
+
|
2183
|
+
options = CalculationOptions.new
|
2184
|
+
options.calc_stack_size = 1
|
2185
|
+
|
2186
|
+
response = @cells_api.post_calulate_cell_formula(file_name, sheet_name, cell_name, options, opts = {})
|
2187
|
+
assert(response, message="Failed to calculate cell's formula")
|
2188
|
+
end
|
2189
|
+
|
2190
|
+
def test_cells_charts_post_worksheet_chart
|
2191
|
+
file_name = "Book1.xlsx"
|
2192
|
+
upload_file(file_name)
|
2193
|
+
|
2194
|
+
sheet_name = "sheet4"
|
2195
|
+
chart_index = 1
|
2196
|
+
|
2197
|
+
chart = Chart.new
|
2198
|
+
chart.type = "line"
|
2199
|
+
|
2200
|
+
response = @cells_api.cells_charts_post_worksheet_chart(file_name, sheet_name, chart_index, chart, opts = {})
|
2201
|
+
assert(response, message="Failed to update chart propreties")
|
2202
|
+
end
|
2123
2203
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_cells_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Sohail Ismail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/aspose_cells_cloud/models/cells_document_property.rb
|
122
122
|
- lib/aspose_cells_cloud/models/cells_document_property_response.rb
|
123
123
|
- lib/aspose_cells_cloud/models/cells_response.rb
|
124
|
+
- lib/aspose_cells_cloud/models/chart.rb
|
124
125
|
- lib/aspose_cells_cloud/models/chart_area_response.rb
|
125
126
|
- lib/aspose_cells_cloud/models/charts_chart_area.rb
|
126
127
|
- lib/aspose_cells_cloud/models/charts_charts.rb
|
@@ -162,6 +163,7 @@ files:
|
|
162
163
|
- lib/aspose_cells_cloud/models/fill_format_response.rb
|
163
164
|
- lib/aspose_cells_cloud/models/filter_column.rb
|
164
165
|
- lib/aspose_cells_cloud/models/font.rb
|
166
|
+
- lib/aspose_cells_cloud/models/font_setting.rb
|
165
167
|
- lib/aspose_cells_cloud/models/hyperlink.rb
|
166
168
|
- lib/aspose_cells_cloud/models/hyperlink_response.rb
|
167
169
|
- lib/aspose_cells_cloud/models/hyperlinks.rb
|