aspose_cells_cloud 24.7 → 24.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/lib/aspose_cells_cloud/api/cells_api.rb +14 -0
- data/lib/aspose_cells_cloud/api_client.rb +3 -2
- data/lib/aspose_cells_cloud/models/html_save_options.rb +15 -3
- data/lib/aspose_cells_cloud/models/protect_workbook_request.rb +13 -1
- data/lib/aspose_cells_cloud/models/scope_item.rb +222 -0
- data/lib/aspose_cells_cloud/models/scope_options.rb +222 -0
- data/lib/aspose_cells_cloud/models/text_water_marker_request.rb +16 -4
- data/lib/aspose_cells_cloud/models/trim_content_options.rb +318 -0
- data/lib/aspose_cells_cloud/models/word_case_options.rb +246 -0
- data/lib/aspose_cells_cloud/requests/post_trim_content_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_update_word_case_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/put_convert_workbook_request.rb +16 -2
- data/lib/aspose_cells_cloud/requests/put_workbook_background_request.rb +7 -0
- data/lib/aspose_cells_cloud/requests/put_worksheet_background_request.rb +7 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +6 -0
- data/spec/api/data_processing_controller_spec.rb +3 -1
- data/spec/api/file_controller_spec.rb +0 -36
- data/spec/api/text_processing_controller_spec.rb +75 -0
- metadata +9 -2
@@ -0,0 +1,103 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PostTrimContent_request.rb.cs">
|
4
|
+
Copyright (c) 2024 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
|
+
=end
|
27
|
+
|
28
|
+
|
29
|
+
require "uri"
|
30
|
+
|
31
|
+
module AsposeCellsCloud
|
32
|
+
class PostTrimContentRequest
|
33
|
+
|
34
|
+
attr_accessor :trim_content_options
|
35
|
+
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
41
|
+
|
42
|
+
if attributes.has_key?(:'trimContentOptions')
|
43
|
+
self.trim_content_options = attributes[:'trimContentOptions']
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'trim_content_options' => :'trimContentOptions'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'trim_content_options' => :'TrimContentOptions'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_http_request(api_client,opts = {})
|
62
|
+
if api_client.config.debugging
|
63
|
+
api_client.config.logger.debug "Calling API: CellsApi.post_trim_content ..."
|
64
|
+
end
|
65
|
+
api_client.request_token_if_needed
|
66
|
+
# verify the required parameter 'trim_content_options' is set
|
67
|
+
if api_client.config.client_side_validation && trim_content_options.nil?
|
68
|
+
fail ArgumentError, "Missing the required parameter 'trim_content_options' when calling CellsApi.post_trim_content "
|
69
|
+
end
|
70
|
+
|
71
|
+
# resource path
|
72
|
+
local_var_path = "/cells/trimcontent"
|
73
|
+
# query parameters
|
74
|
+
query_params = {}
|
75
|
+
# header parameters
|
76
|
+
header_params = {}
|
77
|
+
# HTTP header 'Accept' (if needed)
|
78
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
79
|
+
# HTTP header 'Content-Type'
|
80
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
post_body = nil
|
85
|
+
post_body = api_client.object_to_http_body(trim_content_options)
|
86
|
+
|
87
|
+
|
88
|
+
#auth_names = []
|
89
|
+
auth_names = ['JWT']
|
90
|
+
data, status_code, headers = api_client.call_api(:POST, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'FileInfo')
|
97
|
+
if api_client.config.debugging
|
98
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.post_trim_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PostUpdateWordCase_request.rb.cs">
|
4
|
+
Copyright (c) 2024 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
|
+
=end
|
27
|
+
|
28
|
+
|
29
|
+
require "uri"
|
30
|
+
|
31
|
+
module AsposeCellsCloud
|
32
|
+
class PostUpdateWordCaseRequest
|
33
|
+
|
34
|
+
attr_accessor :word_case_options
|
35
|
+
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
41
|
+
|
42
|
+
if attributes.has_key?(:'wordCaseOptions')
|
43
|
+
self.word_case_options = attributes[:'wordCaseOptions']
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'word_case_options' => :'wordCaseOptions'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'word_case_options' => :'WordCaseOptions'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_http_request(api_client,opts = {})
|
62
|
+
if api_client.config.debugging
|
63
|
+
api_client.config.logger.debug "Calling API: CellsApi.post_update_word_case ..."
|
64
|
+
end
|
65
|
+
api_client.request_token_if_needed
|
66
|
+
# verify the required parameter 'word_case_options' is set
|
67
|
+
if api_client.config.client_side_validation && word_case_options.nil?
|
68
|
+
fail ArgumentError, "Missing the required parameter 'word_case_options' when calling CellsApi.post_update_word_case "
|
69
|
+
end
|
70
|
+
|
71
|
+
# resource path
|
72
|
+
local_var_path = "/cells/updatewordcase"
|
73
|
+
# query parameters
|
74
|
+
query_params = {}
|
75
|
+
# header parameters
|
76
|
+
header_params = {}
|
77
|
+
# HTTP header 'Accept' (if needed)
|
78
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
79
|
+
# HTTP header 'Content-Type'
|
80
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
post_body = nil
|
85
|
+
post_body = api_client.object_to_http_body(word_case_options)
|
86
|
+
|
87
|
+
|
88
|
+
#auth_names = []
|
89
|
+
auth_names = ['JWT']
|
90
|
+
data, status_code, headers = api_client.call_api(:POST, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'FileInfo')
|
97
|
+
if api_client.config.debugging
|
98
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.post_update_word_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -41,6 +41,8 @@ module AsposeCellsCloud
|
|
41
41
|
attr_accessor :region
|
42
42
|
attr_accessor :page_wide_fit_on_per_sheet
|
43
43
|
attr_accessor :page_tall_fit_on_per_sheet
|
44
|
+
attr_accessor :sheet_name
|
45
|
+
attr_accessor :page_index
|
44
46
|
|
45
47
|
def initialize(attributes = {})
|
46
48
|
return unless attributes.is_a?(Hash)
|
@@ -78,6 +80,12 @@ module AsposeCellsCloud
|
|
78
80
|
if attributes.has_key?(:'pageTallFitOnPerSheet')
|
79
81
|
self.page_tall_fit_on_per_sheet = attributes[:'pageTallFitOnPerSheet']
|
80
82
|
end
|
83
|
+
if attributes.has_key?(:'sheetName')
|
84
|
+
self.sheet_name = attributes[:'sheetName']
|
85
|
+
end
|
86
|
+
if attributes.has_key?(:'pageIndex')
|
87
|
+
self.page_index = attributes[:'pageIndex']
|
88
|
+
end
|
81
89
|
|
82
90
|
end
|
83
91
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -92,7 +100,9 @@ module AsposeCellsCloud
|
|
92
100
|
:'stream_format' => :'streamFormat',
|
93
101
|
:'region' => :'region',
|
94
102
|
:'page_wide_fit_on_per_sheet' => :'pageWideFitOnPerSheet',
|
95
|
-
:'page_tall_fit_on_per_sheet' => :'pageTallFitOnPerSheet'
|
103
|
+
:'page_tall_fit_on_per_sheet' => :'pageTallFitOnPerSheet',
|
104
|
+
:'sheet_name' => :'sheetName',
|
105
|
+
:'page_index' => :'pageIndex'
|
96
106
|
}
|
97
107
|
end
|
98
108
|
|
@@ -108,7 +118,9 @@ module AsposeCellsCloud
|
|
108
118
|
:'stream_format' => :'String',
|
109
119
|
:'region' => :'String',
|
110
120
|
:'page_wide_fit_on_per_sheet' => :'BOOLEAN',
|
111
|
-
:'page_tall_fit_on_per_sheet' => :'BOOLEAN'
|
121
|
+
:'page_tall_fit_on_per_sheet' => :'BOOLEAN',
|
122
|
+
:'sheet_name' => :'String',
|
123
|
+
:'page_index' => :'Integer'
|
112
124
|
}
|
113
125
|
end
|
114
126
|
|
@@ -135,6 +147,8 @@ module AsposeCellsCloud
|
|
135
147
|
query_params[:'region'] = self.region if !self.region.nil?
|
136
148
|
query_params[:'pageWideFitOnPerSheet'] = self.page_wide_fit_on_per_sheet if !self.page_wide_fit_on_per_sheet.nil?
|
137
149
|
query_params[:'pageTallFitOnPerSheet'] = self.page_tall_fit_on_per_sheet if !self.page_tall_fit_on_per_sheet.nil?
|
150
|
+
query_params[:'sheetName'] = self.sheet_name if !self.sheet_name.nil?
|
151
|
+
query_params[:'pageIndex'] = self.page_index if !self.page_index.nil?
|
138
152
|
|
139
153
|
# header parameters
|
140
154
|
header_params = {}
|
@@ -33,6 +33,7 @@ module AsposeCellsCloud
|
|
33
33
|
|
34
34
|
attr_accessor :name
|
35
35
|
attr_accessor :pic_path
|
36
|
+
attr_accessor :image_adapt_option
|
36
37
|
attr_accessor :folder
|
37
38
|
attr_accessor :storage_name
|
38
39
|
attr_accessor :file
|
@@ -49,6 +50,9 @@ module AsposeCellsCloud
|
|
49
50
|
if attributes.has_key?(:'picPath')
|
50
51
|
self.pic_path = attributes[:'picPath']
|
51
52
|
end
|
53
|
+
if attributes.has_key?(:'imageAdaptOption')
|
54
|
+
self.image_adapt_option = attributes[:'imageAdaptOption']
|
55
|
+
end
|
52
56
|
if attributes.has_key?(:'folder')
|
53
57
|
self.folder = attributes[:'folder']
|
54
58
|
end
|
@@ -65,6 +69,7 @@ module AsposeCellsCloud
|
|
65
69
|
{
|
66
70
|
:'name' => :'name',
|
67
71
|
:'pic_path' => :'picPath',
|
72
|
+
:'image_adapt_option' => :'imageAdaptOption',
|
68
73
|
:'folder' => :'folder',
|
69
74
|
:'storage_name' => :'storageName',
|
70
75
|
:'file' => :'File'
|
@@ -76,6 +81,7 @@ module AsposeCellsCloud
|
|
76
81
|
{
|
77
82
|
:'name' => :'String',
|
78
83
|
:'pic_path' => :'String',
|
84
|
+
:'image_adapt_option' => :'String',
|
79
85
|
:'folder' => :'String',
|
80
86
|
:'storage_name' => :'String',
|
81
87
|
:'file' => :'Hash'
|
@@ -97,6 +103,7 @@ module AsposeCellsCloud
|
|
97
103
|
# query parameters
|
98
104
|
query_params = {}
|
99
105
|
query_params[:'picPath'] = self.pic_path if !self.pic_path.nil?
|
106
|
+
query_params[:'imageAdaptOption'] = self.image_adapt_option if !self.image_adapt_option.nil?
|
100
107
|
query_params[:'folder'] = self.folder if !self.folder.nil?
|
101
108
|
query_params[:'storageName'] = self.storage_name if !self.storage_name.nil?
|
102
109
|
|
@@ -34,6 +34,7 @@ module AsposeCellsCloud
|
|
34
34
|
attr_accessor :name
|
35
35
|
attr_accessor :sheet_name
|
36
36
|
attr_accessor :pic_path
|
37
|
+
attr_accessor :image_adapt_option
|
37
38
|
attr_accessor :folder
|
38
39
|
attr_accessor :storage_name
|
39
40
|
attr_accessor :file
|
@@ -53,6 +54,9 @@ module AsposeCellsCloud
|
|
53
54
|
if attributes.has_key?(:'picPath')
|
54
55
|
self.pic_path = attributes[:'picPath']
|
55
56
|
end
|
57
|
+
if attributes.has_key?(:'imageAdaptOption')
|
58
|
+
self.image_adapt_option = attributes[:'imageAdaptOption']
|
59
|
+
end
|
56
60
|
if attributes.has_key?(:'folder')
|
57
61
|
self.folder = attributes[:'folder']
|
58
62
|
end
|
@@ -70,6 +74,7 @@ module AsposeCellsCloud
|
|
70
74
|
:'name' => :'name',
|
71
75
|
:'sheet_name' => :'sheetName',
|
72
76
|
:'pic_path' => :'picPath',
|
77
|
+
:'image_adapt_option' => :'imageAdaptOption',
|
73
78
|
:'folder' => :'folder',
|
74
79
|
:'storage_name' => :'storageName',
|
75
80
|
:'file' => :'File'
|
@@ -82,6 +87,7 @@ module AsposeCellsCloud
|
|
82
87
|
:'name' => :'String',
|
83
88
|
:'sheet_name' => :'String',
|
84
89
|
:'pic_path' => :'String',
|
90
|
+
:'image_adapt_option' => :'String',
|
85
91
|
:'folder' => :'String',
|
86
92
|
:'storage_name' => :'String',
|
87
93
|
:'file' => :'Hash'
|
@@ -107,6 +113,7 @@ module AsposeCellsCloud
|
|
107
113
|
# query parameters
|
108
114
|
query_params = {}
|
109
115
|
query_params[:'picPath'] = self.pic_path if !self.pic_path.nil?
|
116
|
+
query_params[:'imageAdaptOption'] = self.image_adapt_option if !self.image_adapt_option.nil?
|
110
117
|
query_params[:'folder'] = self.folder if !self.folder.nil?
|
111
118
|
query_params[:'storageName'] = self.storage_name if !self.storage_name.nil?
|
112
119
|
|
data/lib/aspose_cells_cloud.rb
CHANGED
@@ -351,6 +351,10 @@ require 'aspose_cells_cloud/models/pivot_table'
|
|
351
351
|
require 'aspose_cells_cloud/models/pivot_tables'
|
352
352
|
require 'aspose_cells_cloud/models/add_text_options'
|
353
353
|
require 'aspose_cells_cloud/models/base_operate_options'
|
354
|
+
require 'aspose_cells_cloud/models/scope_item'
|
355
|
+
require 'aspose_cells_cloud/models/scope_options'
|
356
|
+
require 'aspose_cells_cloud/models/trim_content_options'
|
357
|
+
require 'aspose_cells_cloud/models/word_case_options'
|
354
358
|
require 'aspose_cells_cloud/models/cell_value'
|
355
359
|
require 'aspose_cells_cloud/models/custom_parser_config'
|
356
360
|
require 'aspose_cells_cloud/models/import2_dimension_double_array_option'
|
@@ -700,6 +704,8 @@ require 'aspose_cells_cloud/requests/put_worksheet_sparkline_group_request'
|
|
700
704
|
require 'aspose_cells_cloud/requests/post_worksheet_sparkline_group_request'
|
701
705
|
require 'aspose_cells_cloud/requests/post_run_task_request'
|
702
706
|
require 'aspose_cells_cloud/requests/post_add_text_content_request'
|
707
|
+
require 'aspose_cells_cloud/requests/post_trim_content_request'
|
708
|
+
require 'aspose_cells_cloud/requests/post_update_word_case_request'
|
703
709
|
require 'aspose_cells_cloud/requests/get_workbook_default_style_request'
|
704
710
|
require 'aspose_cells_cloud/requests/get_workbook_text_items_request'
|
705
711
|
require 'aspose_cells_cloud/requests/get_workbook_names_request'
|
@@ -45,7 +45,9 @@ describe 'CellsApi' do
|
|
45
45
|
|
46
46
|
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
47
47
|
@instance.upload_file(uploadrequest)
|
48
|
-
|
48
|
+
deduplicationRegionRanges = [
|
49
|
+
];
|
50
|
+
deduplicationRegion = AsposeCellsCloud::DeduplicationRegion.new(:Ranges=>deduplicationRegionRanges );
|
49
51
|
request = AsposeCellsCloud::PostWorkbookDataDeduplicationRequest.new(:name=>remote_name,:deduplicationRegion=>deduplicationRegion,:folder=>remote_folder,:storageName=>'');
|
50
52
|
@instance.post_workbook_data_deduplication(request);
|
51
53
|
end
|
@@ -66,40 +66,4 @@ describe 'CellsApi' do
|
|
66
66
|
@instance.copy_file(request);
|
67
67
|
end
|
68
68
|
end
|
69
|
-
|
70
|
-
describe 'move_file test' do
|
71
|
-
it "should work" do
|
72
|
-
remote_folder = 'TestData/In'
|
73
|
-
|
74
|
-
local_name = 'Book1.xlsx'
|
75
|
-
remote_name = 'Book1.xlsx'
|
76
|
-
|
77
|
-
|
78
|
-
mapFiles = { }
|
79
|
-
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
80
|
-
|
81
|
-
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
82
|
-
@instance.upload_file(uploadrequest)
|
83
|
-
request = AsposeCellsCloud::MoveFileRequest.new(:srcPath=>remote_folder + '/' + remote_name,:destPath=>'OutResult/' + remote_name,:srcStorageName=>'',:destStorageName=>'',:versionId=>'');
|
84
|
-
@instance.move_file(request);
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
describe 'delete_file test' do
|
89
|
-
it "should work" do
|
90
|
-
remote_folder = 'TestData/In'
|
91
|
-
|
92
|
-
local_name = 'Book1.xlsx'
|
93
|
-
remote_name = 'Book1.xlsx'
|
94
|
-
|
95
|
-
|
96
|
-
mapFiles = { }
|
97
|
-
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
98
|
-
|
99
|
-
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
100
|
-
@instance.upload_file(uploadrequest)
|
101
|
-
request = AsposeCellsCloud::DeleteFileRequest.new(:path=>remote_folder + '/' + remote_name,:storageName=>'',:versionId=>'');
|
102
|
-
@instance.delete_file(request);
|
103
|
-
end
|
104
|
-
end
|
105
69
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
describe 'CellsApi' do
|
5
|
+
before do
|
6
|
+
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
7
|
+
$VERBOSE = nil
|
8
|
+
end
|
9
|
+
|
10
|
+
after do
|
11
|
+
# run after each test
|
12
|
+
end
|
13
|
+
|
14
|
+
describe 'post_add_text_content test' do
|
15
|
+
it "should work" do
|
16
|
+
remote_folder = 'TestData/In'
|
17
|
+
|
18
|
+
local_name = 'BookText.xlsx'
|
19
|
+
remote_name = 'BookText.xlsx'
|
20
|
+
|
21
|
+
|
22
|
+
mapFiles = { }
|
23
|
+
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
24
|
+
|
25
|
+
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
26
|
+
@instance.upload_file(uploadrequest)
|
27
|
+
addTextOptionsDataSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>'BookText.xlsx' );
|
28
|
+
addTextOptions = AsposeCellsCloud::AddTextOptions.new(:DataSource=>addTextOptionsDataSource ,:Text=>'Aspose.Cells Cloud is an excellent product.' ,:Worksheet=>'202401' ,:SelectPoistion=>'AtTheBeginning' ,:SkipEmptyCells=>true );
|
29
|
+
request = AsposeCellsCloud::PostAddTextContentRequest.new(:addTextOptions=>addTextOptions);
|
30
|
+
@instance.post_add_text_content(request);
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'post_trim_content test' do
|
35
|
+
it "should work" do
|
36
|
+
remote_folder = 'TestData/In'
|
37
|
+
|
38
|
+
local_name = 'BookText.xlsx'
|
39
|
+
remote_name = 'BookText.xlsx'
|
40
|
+
|
41
|
+
|
42
|
+
mapFiles = { }
|
43
|
+
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
44
|
+
|
45
|
+
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
46
|
+
@instance.upload_file(uploadrequest)
|
47
|
+
trimContentOptionsDataSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>'BookText.xlsx' );
|
48
|
+
trimContentOptionsScopeOptions = AsposeCellsCloud::ScopeOptions.new(:Scope=>'EntireWorkbook' );
|
49
|
+
trimContentOptions = AsposeCellsCloud::TrimContentOptions.new(:DataSource=>trimContentOptionsDataSource ,:TrimLeading=>true ,:TrimTrailing=>true ,:TrimSpaceBetweenWordTo1=>true ,:RemoveAllLineBreaks=>true ,:ScopeOptions=>trimContentOptionsScopeOptions );
|
50
|
+
request = AsposeCellsCloud::PostTrimContentRequest.new(:trimContentOptions=>trimContentOptions);
|
51
|
+
@instance.post_trim_content(request);
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'post_update_word_case test' do
|
56
|
+
it "should work" do
|
57
|
+
remote_folder = 'TestData/In'
|
58
|
+
|
59
|
+
local_name = 'BookText.xlsx'
|
60
|
+
remote_name = 'BookText.xlsx'
|
61
|
+
|
62
|
+
|
63
|
+
mapFiles = { }
|
64
|
+
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
65
|
+
|
66
|
+
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
67
|
+
@instance.upload_file(uploadrequest)
|
68
|
+
wordCaseOptionsDataSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>'BookText.xlsx' );
|
69
|
+
wordCaseOptionsScopeOptions = AsposeCellsCloud::ScopeOptions.new(:Scope=>'EntireWorkbook' );
|
70
|
+
wordCaseOptions = AsposeCellsCloud::WordCaseOptions.new(:DataSource=>wordCaseOptionsDataSource ,:WordCaseType=>'None' ,:ScopeOptions=>wordCaseOptionsScopeOptions );
|
71
|
+
request = AsposeCellsCloud::PostUpdateWordCaseRequest.new(:wordCaseOptions=>wordCaseOptions);
|
72
|
+
@instance.post_update_word_case(request);
|
73
|
+
end
|
74
|
+
end
|
75
|
+
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: '24.
|
4
|
+
version: '24.9'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspose Cells Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -547,6 +547,8 @@ files:
|
|
547
547
|
- lib/aspose_cells_cloud/models/save_response.rb
|
548
548
|
- lib/aspose_cells_cloud/models/save_result.rb
|
549
549
|
- lib/aspose_cells_cloud/models/save_result_task_parameter.rb
|
550
|
+
- lib/aspose_cells_cloud/models/scope_item.rb
|
551
|
+
- lib/aspose_cells_cloud/models/scope_options.rb
|
550
552
|
- lib/aspose_cells_cloud/models/scroll_bar.rb
|
551
553
|
- lib/aspose_cells_cloud/models/scroll_bar_response.rb
|
552
554
|
- lib/aspose_cells_cloud/models/series.rb
|
@@ -613,6 +615,7 @@ files:
|
|
613
615
|
- lib/aspose_cells_cloud/models/trendline_response.rb
|
614
616
|
- lib/aspose_cells_cloud/models/trendlines.rb
|
615
617
|
- lib/aspose_cells_cloud/models/trendlines_response.rb
|
618
|
+
- lib/aspose_cells_cloud/models/trim_content_options.rb
|
616
619
|
- lib/aspose_cells_cloud/models/txt_save_options.rb
|
617
620
|
- lib/aspose_cells_cloud/models/unpivot_column.rb
|
618
621
|
- lib/aspose_cells_cloud/models/validation.rb
|
@@ -625,6 +628,7 @@ files:
|
|
625
628
|
- lib/aspose_cells_cloud/models/vertical_page_breaks_response.rb
|
626
629
|
- lib/aspose_cells_cloud/models/walls.rb
|
627
630
|
- lib/aspose_cells_cloud/models/walls_response.rb
|
631
|
+
- lib/aspose_cells_cloud/models/word_case_options.rb
|
628
632
|
- lib/aspose_cells_cloud/models/workbook.rb
|
629
633
|
- lib/aspose_cells_cloud/models/workbook_encryption_request.rb
|
630
634
|
- lib/aspose_cells_cloud/models/workbook_operate_parameter.rb
|
@@ -872,11 +876,13 @@ files:
|
|
872
876
|
- lib/aspose_cells_cloud/requests/post_set_cell_range_value_request.rb
|
873
877
|
- lib/aspose_cells_cloud/requests/post_set_worksheet_column_width_request.rb
|
874
878
|
- lib/aspose_cells_cloud/requests/post_split_request.rb
|
879
|
+
- lib/aspose_cells_cloud/requests/post_trim_content_request.rb
|
875
880
|
- lib/aspose_cells_cloud/requests/post_ungroup_worksheet_columns_request.rb
|
876
881
|
- lib/aspose_cells_cloud/requests/post_ungroup_worksheet_rows_request.rb
|
877
882
|
- lib/aspose_cells_cloud/requests/post_unhide_worksheet_columns_request.rb
|
878
883
|
- lib/aspose_cells_cloud/requests/post_unhide_worksheet_rows_request.rb
|
879
884
|
- lib/aspose_cells_cloud/requests/post_unlock_request.rb
|
885
|
+
- lib/aspose_cells_cloud/requests/post_update_word_case_request.rb
|
880
886
|
- lib/aspose_cells_cloud/requests/post_update_worksheet_cell_style_request.rb
|
881
887
|
- lib/aspose_cells_cloud/requests/post_update_worksheet_ole_object_request.rb
|
882
888
|
- lib/aspose_cells_cloud/requests/post_update_worksheet_property_request.rb
|
@@ -1010,6 +1016,7 @@ files:
|
|
1010
1016
|
- spec/api/shapes_controller_spec.rb
|
1011
1017
|
- spec/api/sparkline_groups_controller_spec.rb
|
1012
1018
|
- spec/api/storage_controller_spec.rb
|
1019
|
+
- spec/api/text_processing_controller_spec.rb
|
1013
1020
|
- spec/api/workbook_controller_spec.rb
|
1014
1021
|
- spec/api/worksheet_controller_spec.rb
|
1015
1022
|
- spec/api/worksheet_validations_controller_spec.rb
|