aspose_cells_cloud 26.8 → 26.9
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/README.md +49 -39
- data/lib/aspose_cells_cloud/requests/smart_marker_template_request.rb +30 -0
- data/lib/aspose_cells_cloud/requests/translate_spreadsheet_request.rb +24 -0
- data/lib/aspose_cells_cloud/requests/translate_text_file_request.rb +24 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/spec/client_spec.rb +114 -0
- data/spec/configuration_spec.rb +61 -0
- data/spec/form_file_spec.rb +47 -0
- data/spec/model_spec.rb +73 -0
- data/spec/request_spec.rb +87 -0
- data/spec/rich_response_spec.rb +46 -0
- data/spec/sdk_error_spec.rb +27 -0
- data/spec/spec_helper.rb +21 -134
- metadata +9 -78
- data/spec/TestData/AggregateCellsByColor.xlsx +0 -0
- data/spec/TestData/Book1.xlsx +0 -0
- data/spec/TestData/BookCsvDuplicateData.csv +0 -21
- data/spec/TestData/BookDuplicateData.xlsx +0 -0
- data/spec/TestData/BookFormula.xlsx +0 -0
- data/spec/TestData/BookTableL2W.xlsx +0 -0
- data/spec/TestData/BookText.xlsx +0 -0
- data/spec/TestData/CompanySales.xlsx +0 -0
- data/spec/TestData/EmployeeSalesSummary-BlankWorksheet.xlsx +0 -0
- data/spec/TestData/EmployeeSalesSummary.xlsx +0 -0
- data/spec/TestData/EmployeeSalesSummary_Locked.xlsx +0 -0
- data/spec/TestData/Formula tutorial.xlsx +0 -0
- data/spec/TestData/Group.xlsx +0 -0
- data/spec/TestData/Home inventory.xlsx +0 -0
- data/spec/TestData/LockedEmployeeSalesSummary.xlsx +0 -0
- data/spec/TestData/OLEDoc.docx +0 -0
- data/spec/TestData/ReportData.xml +0 -1
- data/spec/TestData/Simple invoice.xlsx +0 -0
- data/spec/TestData/Template.xlsx +0 -0
- data/spec/TestData/TestCase.xlsx +0 -0
- data/spec/TestData/TestTables.xlsx +0 -0
- data/spec/TestData/WaterMark.png +0 -0
- data/spec/TestData/assemblytest.xlsx +0 -0
- data/spec/TestData/data.xml +0 -1
- data/spec/TestData/datasource.xlsx +0 -0
- data/spec/TestData/myDocument.xlsx +0 -0
- data/spec/TestData/needUnlock.xlsx +0 -0
- data/spec/TestData/needlock.xlsx +0 -0
- data/spec/TestData/roywang.pfx +0 -0
- data/spec/TestData/word.jpg +0 -0
- data/spec/calculate/calculate_spec.rb +0 -29
- data/spec/cells_cloud30/auto_filter_controller_spec.rb +0 -211
- data/spec/cells_cloud30/batch_controller_spec.rb +0 -113
- data/spec/cells_cloud30/cells_controller_spec.rb +0 -627
- data/spec/cells_cloud30/cells_status_controller_spec.rb +0 -43
- data/spec/cells_cloud30/chart_area_controller_spec.rb +0 -58
- data/spec/cells_cloud30/charts_controller_spec.rb +0 -227
- data/spec/cells_cloud30/conditional_formattings_controller_spec.rb +0 -149
- data/spec/cells_cloud30/conversion30_spec.rb +0 -1112
- data/spec/cells_cloud30/data_processing_controller_spec.rb +0 -97
- data/spec/cells_cloud30/hypelinks_controller_spec.rb +0 -104
- data/spec/cells_cloud30/light_cells_spec.rb +0 -1059
- data/spec/cells_cloud30/list_objects_controller_spec.rb +0 -225
- data/spec/cells_cloud30/ole_objects_controller_spec.rb +0 -108
- data/spec/cells_cloud30/page_breaks_controller_spec.rb +0 -163
- data/spec/cells_cloud30/page_setup_controller_spec.rb +0 -149
- data/spec/cells_cloud30/pictures_controller_spec.rb +0 -106
- data/spec/cells_cloud30/pivot_tables_controller_spec.rb +0 -312
- data/spec/cells_cloud30/properties_controller_spec.rb +0 -89
- data/spec/cells_cloud30/ranges_controller_spec.rb +0 -227
- data/spec/cells_cloud30/shapes_controller_spec.rb +0 -139
- data/spec/cells_cloud30/sparkline_groups_controller_spec.rb +0 -104
- data/spec/cells_cloud30/text_processing_controller_spec.rb +0 -67
- data/spec/cells_cloud30/workbook_controller_spec.rb +0 -519
- data/spec/cells_cloud30/worksheet_controller_spec.rb +0 -609
- data/spec/cells_cloud30/worksheet_validations_controller_spec.rb +0 -104
- data/spec/cells_cloud30/xml_controller_spec.rb +0 -48
- data/spec/data_processing/conversion_spec.rb +0 -428
- data/spec/data_processing/import_data_spec.rb +0 -24
- data/spec/data_processing/merger_spec.rb +0 -28
- data/spec/data_processing/protection_spec.rb +0 -29
- data/spec/data_processing/splitter_spec.rb +0 -47
- data/spec/data_processing/transform_spec.rb +0 -43
- data/spec/dynabic/file_controller_spec.rb +0 -60
- data/spec/dynabic/folder_controller_spec.rb +0 -88
- data/spec/dynabic/storage_controller_spec.rb +0 -73
- data/spec/management/management_spec.rb +0 -111
- data/spec/search2_replace/replacer_spec.rb +0 -46
- data/spec/search2_replace/searcher_spec.rb +0 -131
- data/spec/text_processing/add_text_spec.rb +0 -45
- data/spec/text_processing/convert_text_spec.rb +0 -37
- data/spec/text_processing/extract_text_spec.rb +0 -37
- data/spec/text_processing/remove_characters_spec.rb +0 -53
- data/spec/text_processing/split_text_spec.rb +0 -21
- data/spec/text_processing/trim_spreadsheet_spec.rb +0 -29
- data/spec/text_processing/update_word_case_spec.rb +0 -37
|
@@ -1,104 +0,0 @@
|
|
|
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 'get_worksheet_validations test' do
|
|
15
|
-
it "should work" do
|
|
16
|
-
remote_folder = 'TestData/In'
|
|
17
|
-
|
|
18
|
-
local_name = 'Book1.xlsx'
|
|
19
|
-
remote_name = 'Book1.xlsx'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
23
|
-
|
|
24
|
-
request = AsposeCellsCloud::GetWorksheetValidationsRequest.new(:name=>remote_name,:sheetName=>'Sheet1',:folder=>remote_folder,:storageName=>'');
|
|
25
|
-
@instance.get_worksheet_validations(request);
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
describe 'get_worksheet_validation test' do
|
|
30
|
-
it "should work" do
|
|
31
|
-
remote_folder = 'TestData/In'
|
|
32
|
-
|
|
33
|
-
local_name = 'Book1.xlsx'
|
|
34
|
-
remote_name = 'Book1.xlsx'
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
38
|
-
|
|
39
|
-
request = AsposeCellsCloud::GetWorksheetValidationRequest.new(:name=>remote_name,:sheetName=>'Sheet1',:validationIndex=>0,:folder=>remote_folder,:storageName=>'');
|
|
40
|
-
@instance.get_worksheet_validation(request);
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
describe 'put_worksheet_validation test' do
|
|
45
|
-
it "should work" do
|
|
46
|
-
remote_folder = 'TestData/In'
|
|
47
|
-
|
|
48
|
-
local_name = 'Book1.xlsx'
|
|
49
|
-
remote_name = 'Book1.xlsx'
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
53
|
-
|
|
54
|
-
request = AsposeCellsCloud::PutWorksheetValidationRequest.new(:name=>remote_name,:sheetName=>'Sheet1',:range=>'A1:C10',:folder=>remote_folder,:storageName=>'');
|
|
55
|
-
@instance.put_worksheet_validation(request);
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
describe 'post_worksheet_validation test' do
|
|
60
|
-
it "should work" do
|
|
61
|
-
remote_folder = 'TestData/In'
|
|
62
|
-
|
|
63
|
-
local_name = 'Book1.xlsx'
|
|
64
|
-
remote_name = 'Book1.xlsx'
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
68
|
-
|
|
69
|
-
validation = AsposeCellsCloud::Validation.new(:Formula1=>'=A1' ,:Type=>'Custom' );
|
|
70
|
-
request = AsposeCellsCloud::PostWorksheetValidationRequest.new(:name=>remote_name,:sheetName=>'Sheet1',:validationIndex=>0,:validation=>validation,:folder=>remote_folder,:storageName=>'');
|
|
71
|
-
@instance.post_worksheet_validation(request);
|
|
72
|
-
end
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
describe 'delete_worksheet_validation test' do
|
|
76
|
-
it "should work" do
|
|
77
|
-
remote_folder = 'TestData/In'
|
|
78
|
-
|
|
79
|
-
local_name = 'Book1.xlsx'
|
|
80
|
-
remote_name = 'Book1.xlsx'
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
84
|
-
|
|
85
|
-
request = AsposeCellsCloud::DeleteWorksheetValidationRequest.new(:name=>remote_name,:sheetName=>'Sheet1',:validationIndex=>0,:folder=>remote_folder,:storageName=>'');
|
|
86
|
-
@instance.delete_worksheet_validation(request);
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
describe 'delete_worksheet_validations test' do
|
|
91
|
-
it "should work" do
|
|
92
|
-
remote_folder = 'TestData/In'
|
|
93
|
-
|
|
94
|
-
local_name = 'Book1.xlsx'
|
|
95
|
-
remote_name = 'Book1.xlsx'
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
99
|
-
|
|
100
|
-
request = AsposeCellsCloud::DeleteWorksheetValidationsRequest.new(:name=>remote_name,:sheetName=>'Sheet1',:folder=>remote_folder,:storageName=>'');
|
|
101
|
-
@instance.delete_worksheet_validations(request);
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|
|
@@ -1,48 +0,0 @@
|
|
|
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_workbook_export_xml test' do
|
|
15
|
-
it "should work" do
|
|
16
|
-
remote_folder = 'TestData/In'
|
|
17
|
-
|
|
18
|
-
local_name = 'Template.xlsx'
|
|
19
|
-
remote_name = 'Template.xlsx'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
23
|
-
|
|
24
|
-
request = AsposeCellsCloud::PostWorkbookExportXMLRequest.new(:name=>remote_name,:folder=>remote_folder,:storageName=>'');
|
|
25
|
-
@instance.post_workbook_export_xml(request);
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
describe 'post_workbook_import_xml test' do
|
|
30
|
-
it "should work" do
|
|
31
|
-
remote_folder = 'TestData/In'
|
|
32
|
-
|
|
33
|
-
local_name = 'Template.xlsx'
|
|
34
|
-
data_xml = 'data.xml'
|
|
35
|
-
remote_name = 'Template.xlsx'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
39
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+data_xml,:path=>remote_folder ))
|
|
40
|
-
|
|
41
|
-
importXMLRequestXMLFileSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>remote_folder + '/data.xml' );
|
|
42
|
-
importXMLRequestImportPosition = AsposeCellsCloud::ImportPosition.new(:SheetName=>'Sheet1' ,:RowIndex=>3 ,:ColumnIndex=>4 );
|
|
43
|
-
importXMLRequest = AsposeCellsCloud::ImportXMLRequest.new(:XMLFileSource=>importXMLRequestXMLFileSource ,:ImportPosition=>importXMLRequestImportPosition );
|
|
44
|
-
request = AsposeCellsCloud::PostWorkbookImportXMLRequest.new(:name=>remote_name,:importXMLRequest=>importXMLRequest,:folder=>remote_folder,:storageName=>'');
|
|
45
|
-
@instance.post_workbook_import_xml(request);
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
@@ -1,428 +0,0 @@
|
|
|
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 'workbook_save_as_csv__out_result_post_excel_save_ascsv test' do
|
|
15
|
-
it "should work" do
|
|
16
|
-
local_name = 'Book1.xlsx'
|
|
17
|
-
remote_name = 'Book1.xlsx'
|
|
18
|
-
remote_folder = 'TestData/In'
|
|
19
|
-
|
|
20
|
-
format = "csv"
|
|
21
|
-
newfilename = "OutResult/PostExcelSaveAs.csv"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
25
|
-
|
|
26
|
-
saveOptionsData = AsposeCellsCloud::SaveOptionsData.new(:Filename=>newfilename );
|
|
27
|
-
request = AsposeCellsCloud::SaveSpreadsheetAsRequest.new(:name=>remote_name,:format=>format,:saveOptionsData=>saveOptionsData,:folder=>remote_folder);
|
|
28
|
-
@instance.save_spreadsheet_as(request);
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
describe 'workbook_save_as_pdf__out_result_post_excel_save_aspdf test' do
|
|
33
|
-
it "should work" do
|
|
34
|
-
local_name = 'Book1.xlsx'
|
|
35
|
-
remote_name = 'Book1.xlsx'
|
|
36
|
-
remote_folder = 'TestData/In'
|
|
37
|
-
|
|
38
|
-
format = "pdf"
|
|
39
|
-
newfilename = "OutResult/PostExcelSaveAs.pdf"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
43
|
-
|
|
44
|
-
saveOptionsData = AsposeCellsCloud::SaveOptionsData.new(:Filename=>newfilename );
|
|
45
|
-
request = AsposeCellsCloud::SaveSpreadsheetAsRequest.new(:name=>remote_name,:format=>format,:saveOptionsData=>saveOptionsData,:folder=>remote_folder);
|
|
46
|
-
@instance.save_spreadsheet_as(request);
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
describe 'convert_workbook_png test' do
|
|
51
|
-
it "should work" do
|
|
52
|
-
local_name = 'Book1.xlsx'
|
|
53
|
-
|
|
54
|
-
format = "png"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
request = AsposeCellsCloud::ConvertSpreadsheetRequest.new(:Spreadsheet=>'TestData/' + local_name,:format=>format);
|
|
58
|
-
@instance.convert_spreadsheet(request);
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
describe 'convert_workbook_sql test' do
|
|
63
|
-
it "should work" do
|
|
64
|
-
local_name = 'Book1.xlsx'
|
|
65
|
-
|
|
66
|
-
format = "sql"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
request = AsposeCellsCloud::ConvertSpreadsheetRequest.new(:Spreadsheet=>'TestData/' + local_name,:format=>format);
|
|
70
|
-
@instance.convert_spreadsheet(request);
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
describe 'convert_spreadsheet_to_pdf test' do
|
|
75
|
-
it "should work" do
|
|
76
|
-
local_name = 'Book1.xlsx'
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
request = AsposeCellsCloud::ConvertSpreadsheetToPdfRequest.new(:Spreadsheet=>'TestData/' + local_name);
|
|
80
|
-
@instance.convert_spreadsheet_to_pdf(request);
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
describe 'convert_spreadsheet_to_csv test' do
|
|
85
|
-
it "should work" do
|
|
86
|
-
local_name = 'Book1.xlsx'
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
request = AsposeCellsCloud::ConvertSpreadsheetToCsvRequest.new(:Spreadsheet=>'TestData/' + local_name);
|
|
90
|
-
@instance.convert_spreadsheet_to_csv(request);
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
describe 'convert_spreadsheet_to_json test' do
|
|
95
|
-
it "should work" do
|
|
96
|
-
local_name = 'Book1.xlsx'
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
request = AsposeCellsCloud::ConvertSpreadsheetToJsonRequest.new(:Spreadsheet=>'TestData/' + local_name);
|
|
100
|
-
@instance.convert_spreadsheet_to_json(request);
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
describe 'convert_workbook_save_cloud_csv__out_result_convert_workbookcsv test' do
|
|
105
|
-
it "should work" do
|
|
106
|
-
local_name = 'Book1.xlsx'
|
|
107
|
-
|
|
108
|
-
format = "csv"
|
|
109
|
-
out_path = "OutResult/ConvertWorkbook.csv"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
request = AsposeCellsCloud::ConvertSpreadsheetRequest.new(:Spreadsheet=>'TestData/' + local_name,:format=>format,:outPath=>out_path);
|
|
113
|
-
@instance.convert_spreadsheet(request);
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
describe 'convert_worksheet_to_svg test' do
|
|
118
|
-
it "should work" do
|
|
119
|
-
local_name = 'TestTables.xlsx'
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
request = AsposeCellsCloud::ConvertWorksheetToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:format=>'svg');
|
|
123
|
-
@instance.convert_worksheet_to_image(request);
|
|
124
|
-
end
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
describe 'convert_worksheet_to_png test' do
|
|
128
|
-
it "should work" do
|
|
129
|
-
local_name = 'TestTables.xlsx'
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
request = AsposeCellsCloud::ConvertWorksheetToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:format=>'png');
|
|
133
|
-
@instance.convert_worksheet_to_image(request);
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
describe 'convert_worksheet_to_tiff test' do
|
|
138
|
-
it "should work" do
|
|
139
|
-
local_name = 'TestTables.xlsx'
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
request = AsposeCellsCloud::ConvertWorksheetToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:format=>'tiff');
|
|
143
|
-
@instance.convert_worksheet_to_image(request);
|
|
144
|
-
end
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
describe 'convert_worksheet_to_pdf test' do
|
|
148
|
-
it "should work" do
|
|
149
|
-
local_name = 'TestTables.xlsx'
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
request = AsposeCellsCloud::ConvertWorksheetToPdfRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2');
|
|
153
|
-
@instance.convert_worksheet_to_pdf(request);
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
describe 'convert_worksheet_to_csv test' do
|
|
158
|
-
it "should work" do
|
|
159
|
-
local_name = 'TestTables.xlsx'
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
request = AsposeCellsCloud::ConvertWorksheetToCsvRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2');
|
|
163
|
-
@instance.convert_worksheet_to_csv(request);
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
describe 'convert_worksheet_to_html test' do
|
|
168
|
-
it "should work" do
|
|
169
|
-
local_name = 'TestTables.xlsx'
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
request = AsposeCellsCloud::ConvertWorksheetToHtmlRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2');
|
|
173
|
-
@instance.convert_worksheet_to_html(request);
|
|
174
|
-
end
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
describe 'convert_worksheet_to_html_table test' do
|
|
178
|
-
it "should work" do
|
|
179
|
-
local_name = 'TestTables.xlsx'
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
request = AsposeCellsCloud::ConvertWorksheetToHtmlTableRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2');
|
|
183
|
-
@instance.convert_worksheet_to_html_table(request);
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
describe 'convert_table_to_svg test' do
|
|
188
|
-
it "should work" do
|
|
189
|
-
local_name = 'TestTables.xlsx'
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
request = AsposeCellsCloud::ConvertTableToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:tableName=>'Table13',:format=>'svg');
|
|
193
|
-
@instance.convert_table_to_image(request);
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
describe 'convert_table_to_png test' do
|
|
198
|
-
it "should work" do
|
|
199
|
-
local_name = 'TestTables.xlsx'
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
request = AsposeCellsCloud::ConvertTableToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:tableName=>'Table13',:format=>'png');
|
|
203
|
-
@instance.convert_table_to_image(request);
|
|
204
|
-
end
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
describe 'convert_table_to_pdf test' do
|
|
208
|
-
it "should work" do
|
|
209
|
-
local_name = 'TestTables.xlsx'
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
request = AsposeCellsCloud::ConvertTableToPdfRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:tableName=>'Table13');
|
|
213
|
-
@instance.convert_table_to_pdf(request);
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
describe 'convert_table_to_csv test' do
|
|
218
|
-
it "should work" do
|
|
219
|
-
local_name = 'TestTables.xlsx'
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
request = AsposeCellsCloud::ConvertTableToCsvRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:tableName=>'Table13');
|
|
223
|
-
@instance.convert_table_to_csv(request);
|
|
224
|
-
end
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
describe 'convert_table_to_html test' do
|
|
228
|
-
it "should work" do
|
|
229
|
-
local_name = 'TestTables.xlsx'
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
request = AsposeCellsCloud::ConvertTableToHtmlRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:tableName=>'Table13');
|
|
233
|
-
@instance.convert_table_to_html(request);
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
describe 'convert_table_to_json test' do
|
|
238
|
-
it "should work" do
|
|
239
|
-
local_name = 'TestTables.xlsx'
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
request = AsposeCellsCloud::ConvertTableToJsonRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:tableName=>'Table13');
|
|
243
|
-
@instance.convert_table_to_json(request);
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
describe 'convert_range_to_image test' do
|
|
248
|
-
it "should work" do
|
|
249
|
-
local_name = 'TestTables.xlsx'
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
request = AsposeCellsCloud::ConvertRangeToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:range=>'B2:F10',:format=>'svg');
|
|
253
|
-
@instance.convert_range_to_image(request);
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
describe 'convert_range_to_pdf test' do
|
|
258
|
-
it "should work" do
|
|
259
|
-
local_name = 'TestTables.xlsx'
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
request = AsposeCellsCloud::ConvertRangeToPdfRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:range=>'A1:F10');
|
|
263
|
-
@instance.convert_range_to_pdf(request);
|
|
264
|
-
end
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
describe 'convert_range_to_csv test' do
|
|
268
|
-
it "should work" do
|
|
269
|
-
local_name = 'TestTables.xlsx'
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
request = AsposeCellsCloud::ConvertRangeToCsvRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:range=>'A1:F10');
|
|
273
|
-
@instance.convert_range_to_csv(request);
|
|
274
|
-
end
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
describe 'convert_range_to_html test' do
|
|
278
|
-
it "should work" do
|
|
279
|
-
local_name = 'TestTables.xlsx'
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
request = AsposeCellsCloud::ConvertRangeToHtmlRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:range=>'A1:F10');
|
|
283
|
-
@instance.convert_range_to_html(request);
|
|
284
|
-
end
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
describe 'convert_range_to_json test' do
|
|
288
|
-
it "should work" do
|
|
289
|
-
local_name = 'TestTables.xlsx'
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
request = AsposeCellsCloud::ConvertRangeToJsonRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sheet2',:range=>'A1:F10');
|
|
293
|
-
@instance.convert_range_to_json(request);
|
|
294
|
-
end
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
describe 'convert_chart_to_image_svg test' do
|
|
298
|
-
it "should work" do
|
|
299
|
-
local_name = 'EmployeeSalesSummary.xlsx'
|
|
300
|
-
|
|
301
|
-
format = "svg"
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
request = AsposeCellsCloud::ConvertChartToImageRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sales',:chartIndex=>0,:format=>format);
|
|
305
|
-
@instance.convert_chart_to_image(request);
|
|
306
|
-
end
|
|
307
|
-
end
|
|
308
|
-
|
|
309
|
-
describe 'convert_chart_to_pdf test' do
|
|
310
|
-
it "should work" do
|
|
311
|
-
local_name = 'EmployeeSalesSummary.xlsx'
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
request = AsposeCellsCloud::ConvertChartToPdfRequest.new(:Spreadsheet=>'TestData/' + local_name,:worksheet=>'Sales',:chartIndex=>0);
|
|
315
|
-
@instance.convert_chart_to_pdf(request);
|
|
316
|
-
end
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
describe 'export_spreadsheet_as_format_pdf test' do
|
|
320
|
-
it "should work" do
|
|
321
|
-
local_name = 'Book1.xlsx'
|
|
322
|
-
remote_name = 'Book1.xlsx'
|
|
323
|
-
remote_folder = 'TestData/In'
|
|
324
|
-
|
|
325
|
-
format = "pdf"
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
329
|
-
|
|
330
|
-
request = AsposeCellsCloud::ExportSpreadsheetAsFormatRequest.new(:name=>remote_name,:format=>format,:folder=>remote_folder);
|
|
331
|
-
@instance.export_spreadsheet_as_format(request);
|
|
332
|
-
end
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
describe 'export_spreadsheet_as_format_pptx test' do
|
|
336
|
-
it "should work" do
|
|
337
|
-
local_name = 'Book1.xlsx'
|
|
338
|
-
remote_name = 'Book1.xlsx'
|
|
339
|
-
remote_folder = 'TestData/In'
|
|
340
|
-
|
|
341
|
-
format = "pptx"
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
345
|
-
|
|
346
|
-
request = AsposeCellsCloud::ExportSpreadsheetAsFormatRequest.new(:name=>remote_name,:format=>format,:folder=>remote_folder);
|
|
347
|
-
@instance.export_spreadsheet_as_format(request);
|
|
348
|
-
end
|
|
349
|
-
end
|
|
350
|
-
|
|
351
|
-
describe 'export_spreadsheet_as_format_json test' do
|
|
352
|
-
it "should work" do
|
|
353
|
-
local_name = 'Book1.xlsx'
|
|
354
|
-
remote_name = 'Book1.xlsx'
|
|
355
|
-
remote_folder = 'TestData/In'
|
|
356
|
-
|
|
357
|
-
format = "json"
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
361
|
-
|
|
362
|
-
request = AsposeCellsCloud::ExportSpreadsheetAsFormatRequest.new(:name=>remote_name,:format=>format,:folder=>remote_folder);
|
|
363
|
-
@instance.export_spreadsheet_as_format(request);
|
|
364
|
-
end
|
|
365
|
-
end
|
|
366
|
-
|
|
367
|
-
describe 'export_worksheet_as_format test' do
|
|
368
|
-
it "should work" do
|
|
369
|
-
local_name = 'EmployeeSalesSummary.xlsx'
|
|
370
|
-
remote_name = 'EmployeeSalesSummary.xlsx'
|
|
371
|
-
remote_folder = 'TestData/In'
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
375
|
-
|
|
376
|
-
request = AsposeCellsCloud::ExportWorksheetAsFormatRequest.new(:name=>local_name,:worksheet=>'Sales',:format=>'svg',:folder=>remote_folder);
|
|
377
|
-
@instance.export_worksheet_as_format(request);
|
|
378
|
-
end
|
|
379
|
-
end
|
|
380
|
-
|
|
381
|
-
describe 'export_chart_as_format_svg test' do
|
|
382
|
-
it "should work" do
|
|
383
|
-
local_name = 'EmployeeSalesSummary.xlsx'
|
|
384
|
-
remote_name = 'EmployeeSalesSummary.xlsx'
|
|
385
|
-
remote_folder = 'TestData/In'
|
|
386
|
-
|
|
387
|
-
format = "svg"
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
391
|
-
|
|
392
|
-
request = AsposeCellsCloud::ExportChartAsFormatRequest.new(:name=>local_name,:worksheet=>'Sales',:chartIndex=>0,:format=>format,:folder=>remote_folder);
|
|
393
|
-
@instance.export_chart_as_format(request);
|
|
394
|
-
end
|
|
395
|
-
end
|
|
396
|
-
|
|
397
|
-
describe 'export_table_as_format_svg test' do
|
|
398
|
-
it "should work" do
|
|
399
|
-
local_name = 'TestTables.xlsx'
|
|
400
|
-
remote_name = 'TestTables.xlsx'
|
|
401
|
-
remote_folder = 'TestData/In'
|
|
402
|
-
|
|
403
|
-
format = "svg"
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
407
|
-
|
|
408
|
-
request = AsposeCellsCloud::ExportTableAsFormatRequest.new(:name=>local_name,:worksheet=>'Sheet2',:tableName=>'Table13',:format=>format,:folder=>remote_folder);
|
|
409
|
-
@instance.export_table_as_format(request);
|
|
410
|
-
end
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
describe 'export_range_as_format_svg test' do
|
|
414
|
-
it "should work" do
|
|
415
|
-
local_name = 'EmployeeSalesSummary.xlsx'
|
|
416
|
-
remote_name = 'EmployeeSalesSummary.xlsx'
|
|
417
|
-
remote_folder = 'TestData/In'
|
|
418
|
-
|
|
419
|
-
format = "svg"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+local_name,:path=>remote_folder ))
|
|
423
|
-
|
|
424
|
-
request = AsposeCellsCloud::ExportRangeAsFormatRequest.new(:name=>local_name,:worksheet=>'Sales',:range=>'A1:F16',:format=>format,:folder=>remote_folder);
|
|
425
|
-
@instance.export_range_as_format(request);
|
|
426
|
-
end
|
|
427
|
-
end
|
|
428
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
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 'import_data_into_spreadsheet test' do
|
|
15
|
-
it "should work" do
|
|
16
|
-
book1_xlsx = 'Book1.xlsx'
|
|
17
|
-
cs_v_data_file = 'BookCsvDuplicateData.csv'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
request = AsposeCellsCloud::ImportDataIntoSpreadsheetRequest.new(:datafile=>'TestData/' + cs_v_data_file,:Spreadsheet=>'TestData/' + book1_xlsx,:worksheet=>'Sheet1',:startcell=>'E3');
|
|
21
|
-
@instance.import_data_into_spreadsheet(request);
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
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 'merge_remote_spreadsheet test' do
|
|
15
|
-
it "should work" do
|
|
16
|
-
remote_folder = 'TestData/In'
|
|
17
|
-
book1_xlsx = 'Book1.xlsx'
|
|
18
|
-
book_text_xlsx = 'BookText.xlsx'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+book_text_xlsx,:path=>remote_folder ))
|
|
22
|
-
@instance.upload_file(AsposeCellsCloud::UploadFileRequest.new( :UploadFiles=>"TestData/"+book1_xlsx,:path=>remote_folder ))
|
|
23
|
-
|
|
24
|
-
request = AsposeCellsCloud::MergeRemoteSpreadsheetRequest.new(:name=>book_text_xlsx,:mergedSpreadsheet=>remote_folder + '/' + book1_xlsx,:folder=>remote_folder);
|
|
25
|
-
@instance.merge_remote_spreadsheet(request);
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
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 'protect_spreadsheet test' do
|
|
15
|
-
it "should work" do
|
|
16
|
-
|
|
17
|
-
request = AsposeCellsCloud::ProtectSpreadsheetRequest.new(:Spreadsheet=>'TestData/EmployeeSalesSummary.xlsx',:password=>'123456',:modifyPassword=>'123456');
|
|
18
|
-
@instance.protect_spreadsheet(request);
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
describe 'unprotect_spreadsheet test' do
|
|
23
|
-
it "should work" do
|
|
24
|
-
|
|
25
|
-
request = AsposeCellsCloud::UnprotectSpreadsheetRequest.new(:Spreadsheet=>'TestData/EmployeeSalesSummary_Locked.xlsx',:password=>'123456',:modifyPassword=>'123456');
|
|
26
|
-
@instance.unprotect_spreadsheet(request);
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|