Class: Aspose::Cloud::Cells::Worksheet

Inherits:
Object
  • Object
show all
Defined in:
lib/Cells/worksheet.rb

Instance Method Summary collapse

Constructor Details

#initialize(filename, worksheet_name) ⇒ Worksheet

Returns a new instance of Worksheet.



22
23
24
25
26
27
28
# File 'lib/Cells/worksheet.rb', line 22

def initialize(filename, worksheet_name)
  @filename = filename
  @worksheet_name = worksheet_name
  raise 'filename not specified.' if filename.empty?
  raise 'worksheet_name not specified.' if worksheet_name.empty?
  @base_uri = "#{Aspose::Cloud::Common::Product.product_uri}/cells/#{@filename}/worksheets/#{@worksheet_name}"
end

Instance Method Details

#add_empty_row(row_id, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



679
680
681
682
683
684
685
686
687
688
689
# File 'lib/Cells/worksheet.rb', line 679

def add_empty_row(row_id, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'row_id not specified.' if row_id.nil?

  str_uri = "#{@base_uri}/cells/rows/#{row_id}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.put(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end


260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/Cells/worksheet.rb', line 260

def add_hyperlink(first_row, first_column, total_rows, total_colunms, url, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'first_row not specified.' if first_row.nil?
  raise 'first_column not specified.' if first_column.nil?
  raise 'total_rows not specified.' if total_rows.nil?
  raise 'total_colunms not specified.' if total_colunms.nil?
  raise 'url not specified.' if url.empty?

  str_uri = "#{@base_uri}/hyperlinks?firstRow=#{first_row}&firstColumn=#{first_column}&totalRows=#{total_rows}&totalColumns=#{total_colunms}&address=#{url}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  
  response_stream = RestClient.put(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#add_oleobject(ole_file, image_file, upper_left_row, upper_left_column, height, width, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/Cells/worksheet.rb', line 322

def add_oleobject(ole_file, image_file, upper_left_row, upper_left_column, height, width, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'ole_file not specified.' if ole_file.empty?
  raise 'image_file not specified.' if image_file.empty?
  raise 'upper_left_row not specified.' if upper_left_row.nil?
  raise 'upper_left_column not specified.' if upper_left_column.nil?
  raise 'height not specified.' if height.nil?
  raise 'width not specified.' if width.nil?

  str_uri = "#{@base_uri}/oleobjects"
  qry = Hash.new
  qry[:oleFile] = ole_file
  qry[:imageFile] = image_file
  qry[:upperLeftRow] = upper_left_row
  qry[:upperLeftColumn] = upper_left_column
  qry[:height] = height
  qry[:width] = width
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.put(signed_str_uri, '', {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#add_picture(picture_path, upper_left_row, upper_left_column, lower_right_row, lower_right_column, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'lib/Cells/worksheet.rb', line 555

def add_picture(picture_path, upper_left_row, upper_left_column, lower_right_row, lower_right_column, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'picture_path not specified.' if picture_path.empty?
  raise 'upper_left_row not specified.' if upper_left_row.nil?
  raise 'upper_left_column not specified.' if upper_left_column.nil?
  raise 'lower_right_row not specified.' if lower_right_row.nil?
  raise 'lower_right_column not specified.' if lower_right_column.nil?

  qry = { :upperLeftRow => upper_left_row, :upperLeftColumn => upper_left_column, :lowerRightRow => lower_right_row,
  :lowerRightColumn => lower_right_column, :picturePath => picture_path}
  str_uri = "#{@base_uri}/pictures"
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.put(signed_str_uri, '', { :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#calculate_formula(formula, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



523
524
525
526
527
528
529
530
# File 'lib/Cells/worksheet.rb', line 523

def calculate_formula(formula, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'formula not specified.' if formula.empty?

  str_uri = "#{@base_uri}/formulaResult?formula=#{formula}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Value']
end

#clear_cells_contents(range, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



802
803
804
805
806
807
808
809
810
811
812
# File 'lib/Cells/worksheet.rb', line 802

def clear_cells_contents(range, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'range not specified.' if range.empty?          

  str_uri = "#{@base_uri}/cells/clearcontents?range=#{range}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#clear_cells_formatting(start_row, start_column, end_row, end_column, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



787
788
789
790
791
792
793
794
795
796
797
798
799
800
# File 'lib/Cells/worksheet.rb', line 787

def clear_cells_formatting(start_row, start_column, end_row, end_column, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'start_row not specified.' if start_row.nil?
  raise 'start_column not specified.' if start_column.nil?
  raise 'end_row not specified.' if end_row.nil?
  raise 'end_column not specified.' if end_column.nil?

  str_uri = "#{@base_uri}/cells/ClearFormats?startRow=#{start_row}&startColumn=#{start_column}&endRow=#{end_row}&endColumn=#{end_column}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#copy_row(source_row_index, destination_row_index, row_number, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



691
692
693
694
695
696
697
698
699
700
701
702
703
# File 'lib/Cells/worksheet.rb', line 691

def copy_row(source_row_index, destination_row_index, row_number, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'source_row_index not specified.' if source_row_index.nil?
  raise 'destination_row_index not specified.' if destination_row_index.nil?
  raise 'row_number not specified.' if row_number.nil?

  str_uri = "#{@base_uri}/cells/rows/copy?sourceRowIndex=#{source_row_index}&destinationRowIndex=#{destination_row_index}&rowNumber=#{row_number}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#copy_worksheet(new_worksheet_name, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



603
604
605
606
607
608
609
610
611
612
613
# File 'lib/Cells/worksheet.rb', line 603

def copy_worksheet(new_worksheet_name, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'new_worksheet_name not specified.' if new_worksheet_name.empty?      

  str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/cells/#{@filename}/worksheets/#{new_worksheet_name}/copy?sourcesheet=#{@worksheet_name}"          
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#delete_all_oleobjects(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



363
364
365
366
367
368
# File 'lib/Cells/worksheet.rb', line 363

def delete_all_oleobjects(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/oleobjects"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.delete(signed_str_uri, {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#delete_background(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



639
640
641
642
643
644
645
646
647
# File 'lib/Cells/worksheet.rb', line 639

def delete_background(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/Background"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.delete(signed_str_uri, {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end


293
294
295
296
297
298
299
300
301
302
# File 'lib/Cells/worksheet.rb', line 293

def delete_hyperlink(hyperlink_index, folder_name='', storage_type = 'Aspose', storage_name = '')          
  raise 'hyperlink_index not specified.' if hyperlink_index.nil?

  str_uri = "#{@base_uri}/hyperlinks/#{hyperlink_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  response_stream = RestClient.delete(signed_str_uri, {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#delete_oleobject(index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



354
355
356
357
358
359
360
361
# File 'lib/Cells/worksheet.rb', line 354

def delete_oleobject(index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?

  str_uri = "#{@base_uri}/oleobjects/#{index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.delete(signed_str_uri, {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#delete_picture(picture_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



591
592
593
594
595
596
597
598
599
600
601
# File 'lib/Cells/worksheet.rb', line 591

def delete_picture(picture_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'picture_index not specified.' if picture_index.nil?

  str_uri = "#{@base_uri}/pictures/#{picture_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.delete(signed_str_uri, {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#delete_pictures(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



581
582
583
584
585
586
587
588
589
# File 'lib/Cells/worksheet.rb', line 581

def delete_pictures(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/pictures"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.delete(signed_str_uri, {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#delete_row(index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



481
482
483
484
485
486
487
488
# File 'lib/Cells/worksheet.rb', line 481

def delete_row(index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?

  str_uri = "#{@base_uri}/cells/rows/#{index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.delete(signed_str_uri, {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#freeze_panes(row, column, freezed_rows, freezed_columns, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



649
650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/Cells/worksheet.rb', line 649

def freeze_panes(row, column, freezed_rows, freezed_columns, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'row not specified.' if row.nil?
  raise 'column not specified.' if column.nil?
  raise 'freezed_rows not specified.' if freezed_rows.nil?
  raise 'freezed_columns not specified.' if freezed_columns.nil?

  str_uri = "#{@base_uri}/FreezePanes?row=#{row}&column=#{column}&freezedRows=#{freezed_rows}&freezedColumns=#{freezed_columns}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.put(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#get_auto_shapes_by_index(shape_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



205
206
207
208
209
210
211
212
# File 'lib/Cells/worksheet.rb', line 205

def get_auto_shapes_by_index(shape_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'shape_index not specified.' if shape_index.nil?

  str_uri = "#{@base_uri}/autoshapes/#{shape_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['AutoShapes']
end

#get_auto_shapes_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



198
199
200
201
202
203
# File 'lib/Cells/worksheet.rb', line 198

def get_auto_shapes_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/autoshapes"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['AutoShapes']['AuotShapeList'].length
end

#get_cell(cell_name, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



214
215
216
217
218
219
220
221
# File 'lib/Cells/worksheet.rb', line 214

def get_cell(cell_name, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cell_name not specified.' if cell_name.empty?

  str_uri = "#{@base_uri}/cells/#{cell_name}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cell']
end

#get_cell_style(cell_name, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



223
224
225
226
227
228
229
230
# File 'lib/Cells/worksheet.rb', line 223

def get_cell_style(cell_name, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cell_name not specified.' if cell_name.empty?

  str_uri = "#{@base_uri}/cells/#{cell_name}/style"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Style']
end

#get_cells_count(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



186
187
188
189
190
191
192
193
194
195
196
# File 'lib/Cells/worksheet.rb', line 186

def get_cells_count(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cells']['CellCount']
end

#get_cells_list(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/Cells/worksheet.rb', line 30

def get_cells_list(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cells']['CellList']
end

#get_chart_by_index(chart_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



242
243
244
245
246
247
248
249
# File 'lib/Cells/worksheet.rb', line 242

def get_chart_by_index(chart_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'chart_index not specified.' if chart_index.nil?

  str_uri = "#{@base_uri}/charts/#{chart_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Chart']
end

#get_charts_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



425
426
427
428
429
430
# File 'lib/Cells/worksheet.rb', line 425

def get_charts_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/charts"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Charts']['ChartList'].length
end

#get_column(index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



503
504
505
506
507
508
509
510
# File 'lib/Cells/worksheet.rb', line 503

def get_column(index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?

  str_uri = "#{@base_uri}/cells/columns/#{index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Column']
end

#get_columns_list(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/Cells/worksheet.rb', line 54

def get_columns_list(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/columns"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Columns']['ColumnsList']
end

#get_comment(cell_name, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



304
305
306
307
308
309
310
311
# File 'lib/Cells/worksheet.rb', line 304

def get_comment(cell_name, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cell_name not specified.' if cell_name.empty?

  str_uri = "#{@base_uri}/comments/#{cell_name}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Comment']
end

#get_comments_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



432
433
434
435
436
437
# File 'lib/Cells/worksheet.rb', line 432

def get_comments_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/comments"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Comments']['CommentList'].length
end

#get_first_cell(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/Cells/worksheet.rb', line 90

def get_first_cell(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/firstcell"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cell']
end


251
252
253
254
255
256
257
258
# File 'lib/Cells/worksheet.rb', line 251

def get_hyperlink_by_index(link_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'link_index not specified.' if link_index.nil?

  str_uri = "#{@base_uri}/hyperlinks/#{link_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Hyperlink']
end


439
440
441
442
443
444
# File 'lib/Cells/worksheet.rb', line 439

def get_hyperlinks_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/hyperlinks"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Hyperlinks']['HyperlinkList'].length
end

#get_last_cell(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



102
103
104
105
106
107
108
109
110
111
112
# File 'lib/Cells/worksheet.rb', line 102

def get_last_cell(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/endcell"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cell']
end

#get_max_columns(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/Cells/worksheet.rb', line 66

def get_max_columns(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cells']['MaxColumn']
end

#get_max_data_column(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



126
127
128
129
130
131
132
133
134
135
136
# File 'lib/Cells/worksheet.rb', line 126

def get_max_data_column(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/maxdatacolumn"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  RestClient.get(signed_str_uri, {:accept=>'application/json'})
end

#get_max_data_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



114
115
116
117
118
119
120
121
122
123
124
# File 'lib/Cells/worksheet.rb', line 114

def get_max_data_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/maxdatarow"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  RestClient.get(signed_str_uri, {:accept=>'application/json'})
end

#get_max_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
# File 'lib/Cells/worksheet.rb', line 78

def get_max_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Cells']['MaxRow']
end

#get_mergedcell_by_index(index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



388
389
390
391
392
393
394
395
# File 'lib/Cells/worksheet.rb', line 388

def get_mergedcell_by_index(index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?

  str_uri = "#{@base_uri}/mergedCells/#{index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['MergedCell']
end

#get_mergedcells_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



397
398
399
400
401
402
# File 'lib/Cells/worksheet.rb', line 397

def get_mergedcells_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/mergedCells"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['MergedCells']['Count']
end

#get_min_column(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



162
163
164
165
166
167
168
169
170
171
172
# File 'lib/Cells/worksheet.rb', line 162

def get_min_column(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/mincolumn"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  RestClient.get(signed_str_uri, {:accept=>'application/json'})
end

#get_min_data_column(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



174
175
176
177
178
179
180
181
182
183
184
# File 'lib/Cells/worksheet.rb', line 174

def get_min_data_column(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/mindatacolumn"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  RestClient.get(signed_str_uri, {:accept=>'application/json'})
end

#get_min_data_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



150
151
152
153
154
155
156
157
158
159
160
# File 'lib/Cells/worksheet.rb', line 150

def get_min_data_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/mindatarow"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  RestClient.get(signed_str_uri, {:accept=>'application/json'})
end

#get_min_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



138
139
140
141
142
143
144
145
146
147
148
# File 'lib/Cells/worksheet.rb', line 138

def get_min_row(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/minrow"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  RestClient.get(signed_str_uri, {:accept=>'application/json'})
end

#get_oleobject_by_index(ole_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



313
314
315
316
317
318
319
320
# File 'lib/Cells/worksheet.rb', line 313

def get_oleobject_by_index(ole_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'ole_index not specified.' if ole_index.nil?

  str_uri = "#{@base_uri}/oleobjects/#{ole_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['OleObject']
end

#get_oleobjects_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



418
419
420
421
422
423
# File 'lib/Cells/worksheet.rb', line 418

def get_oleobjects_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/oleobjects"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['OleObjects']['OleOjectList'].length
end

#get_picture_by_index(image_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



370
371
372
373
374
375
376
377
# File 'lib/Cells/worksheet.rb', line 370

def get_picture_by_index(image_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'image_index not specified.' if image_index.nil?

  str_uri = "#{@base_uri}/pictures/#{image_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Picture']
end

#get_pictures_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



411
412
413
414
415
416
# File 'lib/Cells/worksheet.rb', line 411

def get_pictures_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/pictures"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Pictures']['PictureList'].length
end

#get_row(index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



472
473
474
475
476
477
478
479
# File 'lib/Cells/worksheet.rb', line 472

def get_row(index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?

  str_uri = "#{@base_uri}/cells/rows/#{index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Row']
end

#get_row_list(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/Cells/worksheet.rb', line 42

def get_row_list(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/rows"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Rows']['RowsList']
end

#get_rows_count(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



460
461
462
463
464
465
466
467
468
469
470
# File 'lib/Cells/worksheet.rb', line 460

def get_rows_count(offset, count, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'offset not specified.' if offset.nil?
  raise 'count not specified.' if count.nil?

  str_uri = "#{@base_uri}/cells/rows"
  qry = { :offset => offset, :count => count}
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Rows']['RowsCount']
end

#get_validation_by_index(index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



379
380
381
382
383
384
385
386
# File 'lib/Cells/worksheet.rb', line 379

def get_validation_by_index(index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?

  str_uri = "#{@base_uri}/validations/#{index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)          
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Validation']
end

#get_validations_count(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



404
405
406
407
408
409
# File 'lib/Cells/worksheet.rb', line 404

def get_validations_count(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/validations"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.get(signed_str_uri, {:accept=>'application/json'}))['Validations']['Count']
end

#group_rows(first_index, last_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/Cells/worksheet.rb', line 731

def group_rows(first_index, last_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'first_index not specified.' if first_index.nil?
  raise 'last_index not specified.' if last_index.nil?          

  str_uri = "#{@base_uri}/cells/rows/group?firstIndex=#{first_index}&lastIndex=#{last_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#hide_rows(start_row, total_rows, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



705
706
707
708
709
710
711
712
713
714
715
716
# File 'lib/Cells/worksheet.rb', line 705

def hide_rows(start_row, total_rows, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'start_row not specified.' if start_row.nil?
  raise 'total_rows not specified.' if total_rows.nil?          

  str_uri = "#{@base_uri}/cells/rows/hide?startrow=#{start_row}&totalRows=#{total_rows}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#hide_worksheet(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



446
447
448
449
450
451
# File 'lib/Cells/worksheet.rb', line 446

def hide_worksheet(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/visible?isVisible=false"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.put(signed_str_uri, '', {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#merge_cells(start_row, start_column, total_rows, total_colunms, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/Cells/worksheet.rb', line 757

def merge_cells(start_row, start_column, total_rows, total_colunms, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'start_row not specified.' if start_row.nil?
  raise 'start_column not specified.' if start_column.nil?
  raise 'total_rows not specified.' if total_rows.nil?
  raise 'total_colunms not specified.' if total_colunms.nil?

  str_uri = "#{@base_uri}/cells/merge?startrow=#{start_row}&startcolumn=#{start_column}&totalrows=#{total_rows}&totalcolumns=#{total_colunms}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#move_worksheet(position, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



513
514
515
516
517
518
519
520
521
# File 'lib/Cells/worksheet.rb', line 513

def move_worksheet(position, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'position not specified.' if position.nil?

  json_data = { :DestinationWorksheet => @worksheet_name, :Position => position }
  str_uri = "#{@base_uri}/position"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, json_data, { :content_type => :json, :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#rename_worksheet(new_worksheet_name, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



615
616
617
618
619
620
621
622
623
624
625
# File 'lib/Cells/worksheet.rb', line 615

def rename_worksheet(new_worksheet_name, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'new_worksheet_name not specified.' if new_worksheet_name.empty?      

  str_uri = "#{@base_uri}/Rename?newname=#{new_worksheet_name}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#set_background(background_image, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



627
628
629
630
631
632
633
634
635
636
637
# File 'lib/Cells/worksheet.rb', line 627

def set_background(background_image, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'background_image not specified.' if background_image.empty?      

  str_uri = "#{@base_uri}/Background?imageFile=#{background_image}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#set_cell_style(cell_name, style, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



232
233
234
235
236
237
238
239
240
# File 'lib/Cells/worksheet.rb', line 232

def set_cell_style(cell_name, style, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cell_name not specified.' if cell_name.empty?
  raise 'style not specified.' if style.empty?

  str_uri = "#{@base_uri}/cells/#{cell_name}/style"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, style.to_json, { :content_type => :json, :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#set_cell_value(cell_name, value_type, value, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



542
543
544
545
546
547
548
549
550
551
552
553
# File 'lib/Cells/worksheet.rb', line 542

def set_cell_value(cell_name, value_type, value, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cell_name not specified.' if cell_name.empty?
  raise 'value_type not specified.' if value_type.empty?
  raise 'value not specified.' if value.empty?

  str_uri = "#{@base_uri}/cells/#{cell_name}"
  qry = { :value => value, :type => value_type }
  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, '', { :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#set_formula(cell_name, formula, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



532
533
534
535
536
537
538
539
540
# File 'lib/Cells/worksheet.rb', line 532

def set_formula(cell_name, formula, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cell_name not specified.' if cell_name.empty?
  raise 'formula not specified.' if formula.empty?          

  str_uri = "#{@base_uri}/cells/#{cell_name}?formula=#{formula}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, '', { :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#set_range_value(cellarea, value, type, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



814
815
816
817
818
819
820
821
822
823
824
825
826
# File 'lib/Cells/worksheet.rb', line 814

def set_range_value(cellarea, value, type, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'cellarea not specified.' if cellarea.empty?
  raise 'value not specified.' if value.empty?
  raise 'type not specified.' if type.empty?

  str_uri = "#{@base_uri}/cells?cellarea=#{cellarea}&value=#{value}&type=#{type}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#sort_data(data_sort, cell_area, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/Cells/worksheet.rb', line 490

def sort_data(data_sort, cell_area, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'data_sort not specified.' if data_sort.nil?
  raise 'cell_area not specified.' if cell_area.nil?

  str_uri = "#{@base_uri}/sort"
  qry = { :CellArea => cell_area }

  str_uri = Aspose::Cloud::Common::Utils.build_uri(str_uri,qry)
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, data_sort.to_json, { :content_type => :json, :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#unfreeze_panes(row, column, freezed_rows, freezed_columns, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/Cells/worksheet.rb', line 664

def unfreeze_panes(row, column, freezed_rows, freezed_columns, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'row not specified.' if row.nil?
  raise 'column not specified.' if column.nil?
  raise 'freezed_rows not specified.' if freezed_rows.nil?
  raise 'freezed_columns not specified.' if freezed_columns.nil?

  str_uri = "#{@base_uri}/FreezePanes?row=#{row}&column=#{column}&freezedRows=#{freezed_rows}&freezedColumns=#{freezed_columns}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.delete(signed_str_uri, {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#ungroup_rows(first_index, last_index, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/Cells/worksheet.rb', line 744

def ungroup_rows(first_index, last_index, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'first_index not specified.' if first_index.nil?
  raise 'last_index not specified.' if last_index.nil?          

  str_uri = "#{@base_uri}/cells/rows/ungroup?firstIndex=#{first_index}&lastIndex=#{last_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#unhide_rows(start_row, total_rows, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



718
719
720
721
722
723
724
725
726
727
728
729
# File 'lib/Cells/worksheet.rb', line 718

def unhide_rows(start_row, total_rows, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'start_row not specified.' if start_row.nil?
  raise 'total_rows not specified.' if total_rows.nil?          

  str_uri = "#{@base_uri}/cells/rows/unhide?startrow=#{start_row}&totalRows=#{total_rows}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#unhide_worksheet(folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



453
454
455
456
457
458
# File 'lib/Cells/worksheet.rb', line 453

def unhide_worksheet(folder_name = '', storage_type = 'Aspose', storage_name = '')
  str_uri = "#{@base_uri}/visible?isVisible=true"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.put(signed_str_uri, '', {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#unmerge_cells(start_row, start_column, total_rows, total_colunms, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/Cells/worksheet.rb', line 772

def unmerge_cells(start_row, start_column, total_rows, total_colunms, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'start_row not specified.' if start_row.nil?
  raise 'start_column not specified.' if start_column.nil?
  raise 'total_rows not specified.' if total_rows.nil?
  raise 'total_colunms not specified.' if total_colunms.nil?

  str_uri = "#{@base_uri}/cells/unmerge?startrow=#{start_row}&startcolumn=#{start_column}&totalrows=#{total_rows}&totalcolumns=#{total_colunms}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

  response_stream = RestClient.post(signed_str_uri, '', {:accept=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end


276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/Cells/worksheet.rb', line 276

def update_hyperlink(hyperlink_index, url, screen_tip, display_text, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'hyperlink_index not specified.' if hyperlink_index.nil?
  raise 'url not specified.' if url.empty?
  raise 'screen_tip not specified.' if screen_tip.empty?
  raise 'display_text not specified.' if display_text.empty?          

  str_uri = "#{@base_uri}/hyperlinks/#{hyperlink_index}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  
  json_data = JSON.generate('address' => url, 'ScreenTip' => screen_tip, 'TextToDisplay' => display_text)

  response_stream = RestClient.post(signed_str_uri, json_data, {:accept=>'application/json', :content_type=>'application/json'})
  valid_output = Aspose::Cloud::Common::Utils.validate_output(response_stream)
  valid_output.empty? ? Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type) : valid_output
end

#update_oleobject(index, str_xml, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



344
345
346
347
348
349
350
351
352
# File 'lib/Cells/worksheet.rb', line 344

def update_oleobject(index, str_xml, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'index not specified.' if index.nil?
  raise 'str_xml not specified.' if str_xml.empty?          

  str_uri = "#{@base_uri}/oleobjects/#{index}"          
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, str_xml, {:accept=>'application/json'}))['Code'] == 200 ? true : false
end

#update_picture(picture_index, picture_data, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



571
572
573
574
575
576
577
578
579
# File 'lib/Cells/worksheet.rb', line 571

def update_picture(picture_index, picture_data, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'picture_index not specified.' if picture_index.nil?
  raise 'picture_data not specified.' if picture_data.empty?  

  str_uri = "#{@base_uri}/pictures/#{picture_index}"          
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  JSON.parse(RestClient.post(signed_str_uri, picture_data, { :accept=>'application/json'}))['Code'] == 200 ? true : false
end

#update_properties(worksheet_name, gridlines_visible = false, pagebreak_preview = false, ruler_visible = false, folder_name = '', storage_type = 'Aspose', storage_name = '') ⇒ Object



828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'lib/Cells/worksheet.rb', line 828

def update_properties(worksheet_name, gridlines_visible = false, pagebreak_preview = false, ruler_visible = false, folder_name = '', storage_type = 'Aspose', storage_name = '')
  raise 'worksheet_name not specified.' if worksheet_name.empty?

  json_data = { :Name=>worksheet_name, :IsGridlinesVisible=>gridlines_visible, :IsPageBreakPreview=>pagebreak_preview, :IsRulerVisible=>ruler_visible }.to_json
  str_uri = "#{@base_uri}"
  str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,folder_name,storage_name,storage_type)
  signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
  response = RestClient.post(signed_str_uri, json_data, {:content_type=>:json, :accept=>'application/json'})
  json = JSON.parse(response)
  if json['Code'] == 200
    Aspose::Cloud::Common::Utils.download_file(@filename,@filename,folder_name,storage_name,storage_type)
  end
end