Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Aspose.Cells-Cloud-SDK-RUBY
Aspose.Cells-Cloud-SDK-RUBY
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def delete_worksheet_date_filter
name = $BOOK1
sheet_name = $SHEET1
field_index = 1
date_time_grouping_type = 'Day'
year = 2018
month = 12
day = 1
hour = 1
minute = 1
second = 1
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_delete_worksheet_date_filter(name, sheet_name, field_index, date_time_grouping_type, {:year=>year, :month=>month, :day=>day, :hour=>hour, :minute=>minute, :second=>second, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.cells_auto_filter_delete_worksheet_date_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def delete_worksheet_filter
name = $BOOK1
sheet_name = $SHEET1
field_index = 1
criteria = 'test'
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_delete_worksheet_filter(name, sheet_name, field_index, {:criteria=>criteria, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.delete_worksheet_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def get_worksheet_auto_filter
name = $BOOK1
sheet_name = $SHEET1
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_get_worksheet_auto_filter(name, sheet_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.get_worksheet_auto_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def post_worksheet_auto_filter_refresh
name = $BOOK1
sheet_name = $SHEET1
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_post_worksheet_auto_filter_refresh(name, sheet_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.post_worksheet_auto_filter_refresh
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def post_worksheet_match_blanks
name = $BOOK1
sheet_name = $SHEET1
field_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_post_worksheet_match_blanks(name, sheet_name, field_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.post_worksheet_match_blanks
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def post_worksheet_match_non_blanks
name = $BOOK1
sheet_name = $SHEET1
field_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_post_worksheet_match_non_blanks(name, sheet_name, field_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.post_worksheet_match_non_blanks
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_color_filter
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
color = AsposeCellsCloud::Color.new({:A=>255,:B=>255,:R=>0,:G=>255})
themeColor = AsposeCellsCloud::ThemeColor.new({:Tint=>'1.0',:ColorType=>'Text2'})
foregroundcolor = AsposeCellsCloud::CellsColor.new({:Color=>color,:Type=>'Automatic',:ThemeColor=>themeColor})
color1 = AsposeCellsCloud::Color.new({:A=>0,:B=>0,:R=>255,:G=>255})
themeColor1 = AsposeCellsCloud::ThemeColor.new({:Tint=>'1.0',:ColorType=>'Text2'})
backgroundcolor = AsposeCellsCloud::CellsColor.new({:Color=>color1,:Type=>'Automatic',:ThemeColor=>themeColor1})
color_filter = AsposeCellsCloud::ColorFilterRequest.new({:ForegroundColor=>foregroundcolor,:Pattern=>'Solid',:BackgroundColor=>backgroundcolor})
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_color_filter(name, sheet_name, range, field_index, { :color_filter=>color_filter, :match_blanks=>match_blanks, :refresh=>refresh,:folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.put_worksheet_color_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_custom_filter
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
operator_type1 = 'LessOrEqual'
criteria1 = 'test'
is_and = false
operator_type2 = 'LessOrEqual'
criteria2 = 'test'
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_custom_filter(name, sheet_name, range, field_index, operator_type1, criteria1, {:is_and=>is_and, :operator_type2=>operator_type2, :criteria2=>criteria2, :match_blanks=>match_blanks, :refresh=>refresh, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.put_worksheet_custom_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_date_filter
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
date_time_grouping_type = 'Day'
year = 2019
month = 1
day = 1
hour = 1
minute = 1
second = 1
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_date_filter(name, sheet_name, range, field_index, date_time_grouping_type, {:year=>year, :month=>month, :day=>day, :hour=>hour, :minute=>minute, :second=>second, :match_blanks=>match_blanks, :refresh=>refresh, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.put_worksheet_date_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_dynamic_filter
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
dynamic_filter_type = 'May'
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_dynamic_filter(name, sheet_name, range, field_index, dynamic_filter_type, {:match_blanks=>match_blanks, :refresh=>refresh, :folder=>folder})
expect(result.code).to eql(200)# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
end
end
cell = Cell.new()
puts cell.put_worksheet_dynamic_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_filter
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
criteria = 'test'
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_filter(name, sheet_name, range, field_index, criteria, {:match_blanks=>match_blanks, :refresh=>refresh, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.put_worksheet_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_filter_top10
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
is_top = true
is_percent = true
item_count = 1
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_filter_top10(name, sheet_name, range, field_index, is_top, is_percent, item_count, {:match_blanks=>match_blanks, :refresh=>refresh, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.put_worksheet_filter_top10
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def put_worksheet_icon_filter
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
field_index = 0
icon_set_type = 'None'
icon_id = 0
match_blanks = true
refresh = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_auto_filter_put_worksheet_icon_filter(name, sheet_name, range, field_index, icon_set_type, icon_id, {:match_blanks=>match_blanks, :refresh=>refresh, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.put_worksheet_icon_filter
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear cells contents.
def clear_cells_contents
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
start_row = 1
start_column = 1
end_row = 2
end_column = 2
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_clear_contents(name, sheet_name, {:range=>range, :start_row=>start_row, :start_column=>start_column, :end_row=>end_row, :end_column=>end_column, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.clear_cells_contents
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
def clear_formats
name = $BOOK1
sheet_name = $SHEET1
range = $RANGE
start_row = 1
start_column = 1
end_row = 2
end_column = 2
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_clear_formats(name, sheet_name, {:range=>range, :start_row=>start_row, :start_column=>start_column, :end_row=>end_row, :end_column=>end_column, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.clear_formats
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Copy cell into cell
def copy_cell_into_cell
name = $BOOK1
dest_cell_name = 'C1'
sheet_name = $SHEET1
worksheet = $SHEET2
cellname = $CellName
row = 1
column = 1
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_copy_cell_into_cell(name, dest_cell_name, sheet_name, worksheet, {:cellname=>cellname, :row=>row, :column=>column, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.copy_cell_into_cell
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get cells info.
def get_cells_info
name = $BOOK1
sheet_name = $SHEET1
offest = 1
count = 3
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cells(name, sheet_name, {:offest=>offest, :count=>count, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.get_cells_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell's style info.
def get_worksheet_cell_style
name = $BOOK1
sheet_name = $SHEET1
cell_name = 'C1'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell_style(name, sheet_name, cell_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.get_worksheet_cell_style
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'firstcell'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'endcell'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'maxcolumn'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'maxdatacolumn'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'maxdatarow'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'maxrow'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get worksheet merged cell by its index.
def get_worksheet_merged_cell_by_index
name = $BOOK1
sheet_name = $SHEET1
merged_cell_index = 1
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_worksheets_get_worksheet_merged_cell(name, sheet_name, merged_cell_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.get_worksheet_merged_cell_by_index
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get worksheet merged cells.
def get_worksheet_merged_cells
name = $BOOK1
sheet_name = $SHEET1
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_worksheets_get_worksheet_merged_cells(name, sheet_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.get_worksheet_merged_cells
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'mincolumn'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'mindatacolumn'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'mindatarow'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'minrow'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
print(result)
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
## For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Calculate cell's formula
def post_calulate_cell_formula
name = $BOOK1
sheet_name = $SHEET1
cell_name = 'A1'
value = 1
type = 'string'
formula = nil
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_worksheet_cell_set_value(name, sheet_name, cell_name, {:value=>value, :type=>type, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.post_calulate_cell_formula
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
def upload_file(file_name)
response = @cells_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } )
end
# Rich text formatting in a single cell.
def post_cell_text_formatting
file_name = "Book1.xlsx"
upload_file(file_name)
sheet_name = "sheet1"
cell_name = "A1"
# Set cell value
response = @cells_api.post_worksheet_cell_set_value(file_name, sheet_name, cell_name, {value: "121211212112", type: "string"})
fontSetting1 = FontSetting.new
fontSetting1.length = 5
fontSetting1.start_index = 0
font1 = Font.new
font1.is_bold = true
font1.size = 24
fontSetting1.font = font1
fontSetting2 = FontSetting.new
fontSetting2.length = 4
fontSetting2.start_index = 5
font2 = Font.new
font2.is_italic = true
font2.size = 15
fontSetting2.font = font2
options = [fontSetting1, fontSetting2]
# Rich text formatting in a single cell
response = @cells_api.post_cell_text_formatting(file_name, sheet_name, cell_name, options, opts = {})
end
end
cell = Cell.new()
puts cell.post_cell_text_formatting
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Update cell's style.
def post_update_worksheet_cell_style
name = $BOOK1
sheet_name = $SHEET1
cell_name = 'C1'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell_style(name, sheet_name, cell_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.post_update_worksheet_cell_style
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read cell data by cell's name.
def read_cell_data_by_cell_name
name = $BOOK1
sheet_name = $SHEET1
cell_or_method_name = 'firstcell'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_cell(name, sheet_name, cell_or_method_name, { :folder=>folder})
end
end
cell = Cell.new()
puts cell.read_cell_data_by_cell_name
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Set cell range value
def set_cell_range_value
name = $BOOK1
sheet_name = $SHEET1
cellarea = $CELLAREA
value = 1
type = 'string'
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_set_cell_range_value(name, sheet_name, cellarea, value, type, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.set_cell_range_value
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Set cell value.
def set_cell_value
name = $BOOK1
sheet_name = $SHEET1
cell_name = 'A1'
value = 1
type = 'string'
formula = nil
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_worksheet_cell_set_value(name, sheet_name, cell_name, {:value=>value, :type=>type, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.set_cell_value
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Set htmlstring value into cell
def set_html_string_value_into_cell
name = $BOOK1
sheet_name = $SHEET1
cell_name = $CellName
folder = $TEMPFOLDER
storage = nil
html_string ="sssssssssssssssssssssss"
# result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
# expect(result.uploaded.size).to be > 0
result = @instance.cells_post_set_cell_html_string(name, sheet_name, cell_name, html_string, { :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.set_html_string_value_into_cell
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Cell
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Update cell's style.
def update_cell_style
name = $BOOK1
sheet_name = $SHEET1
cell_name = 'A1'
style = AsposeCellsCloud::Style.new
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_update_worksheet_cell_style(name, sheet_name, cell_name,{ :style=>style, :folder=>folder})
expect(result.code).to eql(200)
end
end
cell = Cell.new()
puts cell.update_cell_style
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Add chart title / Set chart title visible
def add_chart_title
sheet_name = $SHEET3
chart_index = 0
title = AsposeCellsCloud::Title.new
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_put_worksheet_chart_title(name, sheet_name, chart_index, {:title=>title, :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.add_chart_title
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Add new chart to worksheet.
def add_new_chart_to_worksheet
name = $MYDOC
sheet_name = $SHEET3
chart_type = 'Pie'
upper_left_row = 5
upper_left_column = 5
lower_right_row = 10
lower_right_column = 10
area = $CELLAREA
is_vertical = true
category_data = nil
is_auto_get_serial_name = nil
title = nil
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_put_worksheet_add_chart(name, sheet_name, chart_type, { :upper_left_row=>upper_left_row, :upper_left_column=>upper_left_column, :lower_right_row=>lower_right_row, :lower_right_column=>lower_right_column, :area=>area, :is_vertical=>is_vertical, :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.add_new_chart_to_worksheet
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Update chart propreties
def cells_charts_post_worksheet_chart
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
chart = AsposeCellsCloud::Chart.new
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_post_worksheet_chart(name, sheet_name, chart_index, { :chart=>chart,:folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.cells_charts_post_worksheet_chart
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Clear the charts.
def clear_the_charts
name = $MYDOC
sheet_name = $SHEET3
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_delete_worksheet_clear_charts(name, sheet_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.clear_the_charts
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Delete worksheet chart by index.
def delete_worksheet_chart_by_index
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_delete_worksheet_delete_chart(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.delete_worksheet_chart_by_index
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get chart area border info.
def get_chart_area_border_info
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_chart_area_get_chart_area_border(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.get_chart_area_border_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get chart area fill format info.
def get_chart_area_fill_format_info
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_chart_area_get_chart_area_fill_format(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.get_chart_area_fill_format_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get chart area info.
def get_chart_area_info
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_chart_area_get_chart_area(name, sheet_name, chart_index, { :folder=>folder})
end
end
chart = Chart.new()
puts chart.get_chart_area_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get chart in specified format.
def get_chart_in_specified_format
name = $MYDOC
sheet_name = $SHEET3
chart_number = 0
format = 'PNG'
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_get_worksheet_chart(name, sheet_name, chart_number, {:format=>format, :folder=>folder})
end
end
chart = Chart.new()
puts chart.get_chart_in_specified_format
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get chart info.
def get_chart_info
name = $MYDOC
sheet_name = $SHEET3
chart_number = 0
format = 'PNG'
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_get_worksheet_chart(name, sheet_name, chart_number, {:format=>format, :folder=>folder})
end
end
chart = Chart.new()
puts chart.get_chart_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get chart legend
def get_chart_legend
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_get_worksheet_chart_legend(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.get_chart_legend
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get worksheet charts info.
def get_worksheet_charts_info
name = $MYDOC
sheet_name = $SHEET3
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_get_worksheet_charts(name, sheet_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.get_worksheet_charts_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Hide legend in chart
def hide_legend_in_chart
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_delete_worksheet_chart_legend(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.hide_legend_in_chart
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Hide title in chart
def hide_title_in_chart
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_delete_worksheet_chart_title(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.hide_title_in_chart
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Show legend in chart
def show_legend_in_chart
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_delete_worksheet_chart_title(name, sheet_name, chart_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.show_legend_in_chart
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Update chart legend
def update_chart_legend
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
legend = AsposeCellsCloud::Legend.new
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_post_worksheet_chart_legend(name, sheet_name, chart_index, { :legend=>legend, :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.update_chart_legend
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Chart
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Update chart title
def update_chart_title
name = $MYDOC
sheet_name = $SHEET3
chart_index = 0
title = AsposeCellsCloud::Title.new
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_charts_post_worksheet_chart_title(name, sheet_name, chart_index, { :title=>title, :folder=>folder})
expect(result.code).to eql(200)
end
end
chart = Chart.new()
puts chart.update_chart_title
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Copy worksheet columns.
def copy_worksheet_columns
name = $BOOK1
sheet_name = $SHEET1
source_column_index = 100
destination_column_index = 100
column_number = 1
worksheet = $SHEET2
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_copy_worksheet_columns(name, sheet_name, source_column_index, destination_column_index, column_number, { :worksheet=>worksheet,:folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.copy_worksheet_columns
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Delete worksheet columns.
def delete_worksheet_columns
name = $BOOK1
sheet_name = $SHEET1
column_index = 100
columns = 2
update_reference = true
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_delete_worksheet_columns(name, sheet_name, column_index, columns, update_reference, { :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.delete_worksheet_columns
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Group worksheet columns.
def group_worksheet_columns
name = $BOOK1
sheet_name = $SHEET1
first_index = 1
last_index = 4
hide = true
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_group_worksheet_columns(name, sheet_name, first_index, last_index, { :hide=>hide, :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.group_worksheet_columns
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Hide worksheet columns.
def hide_worksheet_columns
name = $BOOK1
sheet_name = $SHEET1
start_column = 1
total_columns = 2
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_hide_worksheet_columns(name, sheet_name, start_column, total_columns, { :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.hide_worksheet_columns
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Insert worksheet columns.
def insert_worksheet_columns
name = $BOOK1
sheet_name = $SHEET1
column_index = 100
columns = 2
update_reference = true
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_put_insert_worksheet_columns(name, sheet_name, column_index, columns, {:update_reference=>update_reference, :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.insert_worksheet_columns
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read worksheet column data by column's index.
def read_worksheet_column_data_by_index
name = $BOOK1
sheet_name = $SHEET1
column_index = 100
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_column(name, sheet_name, column_index, { :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.read_worksheet_column_data_by_index
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Read worksheet columns info.
def read_worksheet_columns_info
name = $BOOK1
sheet_name = $SHEET1
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_get_worksheet_columns(name, sheet_name, { :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.read_worksheet_columns_info
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Set column style
def set_column_style
name = $BOOK1
sheet_name = $SHEET1
column_index = 100
style = AsposeCellsCloud::Style.new
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_column_style(name, sheet_name, column_index, { :style=>style, :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.set_column_style
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Set worksheet column width.
def set_worksheet_column_width
name = $BOOK1
sheet_name = $SHEET1
column_index = 100
width = 10
folder = $TEMPFOLDER
storage = nil
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_post_set_worksheet_column_width(name, sheet_name, column_index, width, { :folder=>folder})
expect(result.code).to eql(200)
end
end
column = Column.new()
puts column.set_worksheet_column_width
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Column
include AsposeCellsCloud