Last active
August 31, 2017 06:46
-
-
Save aspose-cells/53fb9eb3d3d0d6e836078d4677a51ab5 to your computer and use it in GitHub Desktop.
The GIST contains Ruby code snippets for examples of Aspose.Cells for Cloud.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.Cells-for-Cloud-for-Ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def delete_worksheet_date_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
field_index=0 | |
date_time_grouping_type="Year" | |
response = @cells_api.delete_worksheet_date_filter(file_name, sheet_name, field_index, date_time_grouping_type, {year: 1920}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.delete_worksheet_date_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def delete_worksheet_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
field_index=0 | |
response = @cells_api.delete_worksheet_filter(file_name, sheet_name, field_index, {criteria: "Year"}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.delete_worksheet_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def get_worksheet_auto_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_worksheet_auto_filter(file_name, sheet_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.get_worksheet_auto_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def post_worksheet_auto_filter_refresh | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.post_worksheet_auto_filter_refresh(file_name, sheet_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.post_worksheet_auto_filter_refresh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def post_worksheet_match_blanks | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
field_index=0 | |
response = @cells_api.post_worksheet_match_blanks(file_name, sheet_name, field_index) | |
end | |
end | |
cell = Cell.new() | |
puts cell.post_worksheet_match_blanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def post_worksheet_match_non_blanks | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
field_index=0 | |
response = @cells_api.post_worksheet_match_non_blanks(file_name, sheet_name, field_index) | |
end | |
end | |
cell = Cell.new() | |
puts cell.post_worksheet_match_non_blanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_color_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
color_filter_request = ColorFilterRequest.new | |
color_filter_request.pattern = "Solid" | |
foreground_color = CellsColor.new | |
color = Color.new | |
color.a = "255" | |
color.r = "0" | |
color.g = "255" | |
color.b = "255" | |
foreground_color.color = color | |
foreground_theme_color = ThemeColor.new | |
foreground_theme_color.color_type = "Text2" | |
foreground_theme_color.tint = 1 | |
foreground_color.theme_color = foreground_theme_color | |
foreground_color.type = "Automatic" | |
color_filter_request.foreground_color = foreground_color | |
background_color = CellsColor.new | |
color = Color.new | |
color.a = "255" | |
color.r = "255" | |
color.g = "0" | |
color.b = "0" | |
background_color.color = color | |
background_theme_color = ThemeColor.new | |
background_theme_color.color_type = "Text2" | |
background_theme_color.tint = 1 | |
background_color.theme_color = background_theme_color | |
background_color.type = "Automatic" | |
color_filter_request.background_color = background_color | |
response = @cells_api.put_worksheet_color_filter(file_name, sheet_name, range, field_index, color_filter_request, {match_blanks: true}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_color_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_custom_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
operator_type1="LessOrEqual" | |
criteria1 = 1 | |
response = @cells_api.put_worksheet_custom_filter(file_name, sheet_name, range, field_index, operator_type1, criteria1, {match_blanks: false}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_custom_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_date_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
date_time_grouping_type="Year" | |
response = @cells_api.put_worksheet_date_filter(file_name, sheet_name, range, field_index, date_time_grouping_type, | |
{year: 1920, match_blanks:false, refresh:true}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_date_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_dynamic_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
dynamic_filter_type="BelowAverage" | |
response = @cells_api.put_worksheet_dynamic_filter(file_name, sheet_name, range, field_index, dynamic_filter_type, {match_blanks: true}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_dynamic_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
criteria="Year" | |
response = @cells_api.put_worksheet_filter(file_name, sheet_name, range, field_index, criteria) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_filter_top10 | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
is_top=true | |
item_count = 1 | |
response = @cells_api.put_worksheet_filter_top10(file_name, sheet_name, range, field_index, is_top, item_count, opts = {match_blanks: true, is_percent: true}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_filter_top10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_icon_filter | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range="A1:B1" | |
field_index=0 | |
icon_set_type="ArrowsGray3" | |
icon_id = 1 | |
response = @cells_api.put_worksheet_icon_filter(file_name, sheet_name, range, field_index, icon_set_type, icon_id, {match_blanks: false}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.put_worksheet_icon_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def clear_cells_contents | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.post_clear_contents(file_name, sheet_name, {range: "A2:C11", startRow: 2, startColumn: 1, endRow: 11, endColumn: 3}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.clear_cells_contents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def clear_formats | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.post_clear_formats(file_name, sheet_name, {range: "A2:C11", startRow: 2, startColumn: 1, endRow: 11, endColumn: 3}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.clear_formats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Copy cell into cell | |
def copy_cell_into_cell | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
dest_cell_name = "C5" | |
sheet_name = "Sheet1" | |
worksheet = "Sheet1" | |
response = @cells_api.post_copy_cell_into_cell(file_name, dest_cell_name, sheet_name, worksheet, {cellname: "A5"}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.copy_cell_into_cell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get cells info. | |
def get_cells_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_worksheet_cells(file_name, sheet_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.get_cells_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell's style info. | |
def get_worksheet_cell_style | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_name = "A7" | |
response = @cells_api.get_worksheet_cell_style(file_name, sheet_name, cell_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.get_worksheet_cell_style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "firstcell" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "endcell" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "maxcolumn" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "maxdatacolumn" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "maxdatarow" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "maxrow" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet merged cell by its index. | |
def get_worksheet_merged_cell_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
merged_cell_index = 0 | |
response = @cells_api.get_work_sheet_merged_cell(file_name, sheet_name, merged_cell_index) | |
end | |
end | |
cell = Cell.new() | |
puts cell.get_worksheet_merged_cell_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet merged cells. | |
def get_worksheet_merged_cells | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_work_sheet_merged_cells(file_name, sheet_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.get_worksheet_merged_cells |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "mincolumn" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "mindatacolumn" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "mindatarow" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_or_method_name = "minrow" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Calculate cell's formula | |
def post_calulate_cell_formula | |
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, {formula: "NOW()"}) | |
# Calculate cell's formula | |
options = CalculationOptions.new | |
options.calc_stack_size = 1 | |
response = @cells_api.post_calulate_cell_formula(file_name, sheet_name, cell_name, options, opts = {}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.post_calulate_cell_formula |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update cell's style. | |
def post_update_worksheet_cell_style | |
file_name = "test_cells.xlsx" | |
#upload_file(file_name) | |
sheet_name = "Sheet3" | |
cell_name = "A1" | |
cell_style = Style.new | |
background_theme_color = ThemeColor.new | |
background_theme_color.color_type = "Text2" | |
background_theme_color.tint = 1 | |
cell_style.background_theme_color = background_theme_color | |
response = @cells_api.post_update_worksheet_cell_style(file_name, sheet_name, cell_name, cell_style) | |
end | |
end | |
cell = Cell.new() | |
puts cell.post_update_worksheet_cell_style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read cell data by cell's name. | |
def read_cell_data_by_cell_name | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_or_method_name = "A3" | |
response = @cells_api.get_worksheet_cell(file_name, sheet_name, cell_or_method_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.read_cell_data_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set cell range value | |
def set_cell_range_value | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cellarea = "A10:B20" | |
value = "1234" | |
type = "int" | |
response = @cells_api.post_set_cell_range_value(file_name, sheet_name, cellarea, value, type) | |
end | |
end | |
cell = Cell.new() | |
puts cell.set_cell_range_value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set cell value. | |
def set_cell_value | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_name = "A3" | |
response = @cells_api.post_worksheet_cell_set_value(file_name, sheet_name, cell_name, {value: "1234", type: "string", formula: "sum(a1,a2)"}) | |
end | |
end | |
cell = Cell.new() | |
puts cell.set_cell_value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set htmlstring value into cell | |
def set_html_string_value_into_cell | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_name = "A3" | |
response = @cells_api.post_set_cell_html_string(file_name, sheet_name, cell_name) | |
end | |
end | |
cell = Cell.new() | |
puts cell.set_html_string_value_into_cell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Cell | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update cell's style. | |
def update_cell_style | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_name = "A3" | |
cell_style = Style.new | |
font = Font.new | |
font.double_size = 20 | |
font.is_bold = true | |
font.is_italic = true | |
font.is_strikeout = true | |
font.size = 15 | |
cell_style.font = font | |
cell_style.shrink_to_fit = true | |
background_color = Color.new | |
background_color.r = "255" | |
background_color.g = "255" | |
background_color.b = "255" | |
cell_style.background_color = background_color | |
response = @cells_api.post_update_worksheet_cell_style(file_name, sheet_name, cell_name, cell_style) | |
end | |
end | |
cell = Cell.new() | |
puts cell.update_cell_style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add chart title / Set chart title visible | |
def add_chart_title | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
chart_title = ChartsTitle.new | |
chart_title.text = "Sales Chart" | |
response = @cells_api.put_worksheet_chart_title(file_name, sheet_name, chart_index, chart_title) | |
end | |
end | |
chart = Chart.new() | |
puts chart.add_chart_title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add new chart to worksheet. | |
def add_new_chart_to_worksheet | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
chart_type = "Bar" | |
response = @cells_api.put_worksheet_add_chart(file_name, sheet_name, chart_type, {upperLeftRow: 12, upperLeftColumn: 12, lowerRightRow: 20, lowerRightColumn: 20, area: "B1:F2", isVertical: true, categoryData: "A1:A2", isAutoGetSerialName: true, title: "SalesState"}) | |
end | |
end | |
chart = Chart.new() | |
puts chart.add_new_chart_to_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update chart propreties | |
def cells_charts_post_worksheet_chart | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet4" | |
chart_index = 1 | |
chart = Chart.new | |
chart.type = "line" | |
response = @cells_api.cells_charts_post_worksheet_chart(file_name, sheet_name, chart_index, chart, opts = {}) | |
end | |
end | |
chart = Chart.new() | |
puts chart.cells_charts_post_worksheet_chart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear the charts. | |
def clear_the_charts | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.delete_worksheet_clear_charts(file_name, sheet_name) | |
end | |
end | |
chart = Chart.new() | |
puts chart.clear_the_charts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet chart by index. | |
def delete_worksheet_chart_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.delete_worksheet_delete_chart(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.delete_worksheet_chart_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get chart area border info. | |
def get_chart_area_border_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.get_chart_area_border(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_chart_area_border_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get chart area fill format info. | |
def get_chart_area_fill_format_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.get_chart_area_fill_format(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_chart_area_fill_format_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get chart area info. | |
def get_chart_area_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.get_chart_area(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_chart_area_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get chart in specified format. | |
def get_chart_in_specified_format | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_number = 0 | |
format = "png" | |
response = @cells_api.get_worksheet_chart_with_format(file_name, sheet_name, chart_number, format) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_chart_in_specified_format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get chart info. | |
def get_chart_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_number = 0 | |
response = @cells_api.get_worksheet_chart(file_name, sheet_name, chart_number) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_chart_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get chart legend | |
def get_chart_legend | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.get_worksheet_chart_legend(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_chart_legend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet charts info. | |
def get_worksheet_charts_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_worksheet_charts(file_name, sheet_name) | |
end | |
end | |
chart = Chart.new() | |
puts chart.get_worksheet_charts_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Hide legend in chart | |
def hide_legend_in_chart | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.delete_worksheet_chart_legend(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.hide_legend_in_chart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Hide title in chart | |
def hide_title_in_chart | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.delete_worksheet_chart_title(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.hide_title_in_chart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Show legend in chart | |
def show_legend_in_chart | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
response = @cells_api.put_worksheet_chart_legend(file_name, sheet_name, chart_index) | |
end | |
end | |
chart = Chart.new() | |
puts chart.show_legend_in_chart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update chart legend | |
def update_chart_legend | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
charts_legend = ChartsLegend.new | |
font = Font.new | |
color = Color.new | |
color.a = "1" | |
color.r = "255" | |
color.g = "0" | |
color.b = "0" | |
font.color = color | |
font.double_size = 10.0 | |
font.is_bold = true | |
font.is_italic = false | |
font.is_strikeout = false | |
font.is_subscript = false | |
font.is_superscript = false | |
font.name = "Arial" | |
font.size = 10 | |
font.size = 15 | |
font.underline = "None" | |
charts_legend.font = font | |
charts_legend.shadow = true | |
response = @cells_api.post_worksheet_chart_legend(file_name, sheet_name, chart_index, charts_legend) | |
end | |
end | |
chart = Chart.new() | |
puts chart.update_chart_legend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Chart | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update chart title | |
def update_chart_title | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet5" | |
chart_index = 0 | |
chart_title = ChartsTitle.new | |
chart_title.text = "Stock exchange" | |
response = @cells_api.post_worksheet_chart_title(file_name, sheet_name, chart_index, chart_title) | |
end | |
end | |
chart = Chart.new() | |
puts chart.update_chart_title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Copy worksheet columns. | |
def copy_worksheet_columns | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
source_column_index = 2 | |
destination_column_index = 0 | |
column_number = 4 | |
response = @cells_api.post_copy_worksheet_columns(file_name, sheet_name, source_column_index, destination_column_index, column_number) | |
end | |
end | |
column = Column.new() | |
puts column.copy_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet columns. | |
def delete_worksheet_columns | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
column_index = 1 | |
columns = 10 | |
update_reference = true | |
response = @cells_api.delete_worksheet_columns(file_name, sheet_name, column_index, columns, update_reference) | |
end | |
end | |
column = Column.new() | |
puts column.delete_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Group worksheet columns. | |
def group_worksheet_columns | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
first_index = 0 | |
last_index = 2 | |
response = @cells_api.post_group_worksheet_columns(file_name, sheet_name, first_index, last_index, {hide: true}) | |
end | |
end | |
column = Column.new() | |
puts column.group_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Hide worksheet columns. | |
def hide_worksheet_columns | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
start_column = 0 | |
total_columns = 1 | |
response = @cells_api.post_hide_worksheet_columns(file_name, sheet_name, start_column, total_columns) | |
end | |
end | |
column = Column.new() | |
puts column.hide_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Insert worksheet columns. | |
def insert_worksheet_columns | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
column_index = 5 | |
columns = 3 | |
response = @cells_api.put_insert_worksheet_columns(file_name, sheet_name, column_index, columns, {updateReference: true}) | |
end | |
end | |
column = Column.new() | |
puts column.insert_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet column data by column's index. | |
def read_worksheet_column_data_by_index | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
column_index = 1 | |
response = @cells_api.get_worksheet_column(file_name, sheet_name, column_index) | |
end | |
end | |
column = Column.new() | |
puts column.read_worksheet_column_data_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet columns info. | |
def read_worksheet_columns_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_worksheet_columns(file_name, sheet_name) | |
end | |
end | |
column = Column.new() | |
puts column.read_worksheet_columns_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set column style | |
def set_column_style | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
column_index = 0 | |
column_style = Style.new | |
background_color = Color.new | |
background_color.a = "1" | |
background_color.r = "245" | |
background_color.g = "200" | |
background_color.b = "178" | |
column_style.background_color = background_color | |
response = @cells_api.post_column_style(file_name, sheet_name, column_index, column_style) | |
end | |
end | |
column = Column.new() | |
puts column.set_column_style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set worksheet column width. | |
def set_worksheet_column_width | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
column_index = 3 | |
width = 25.0 | |
response = @cells_api.post_set_worksheet_column_width(file_name, sheet_name, column_index, width) | |
end | |
end | |
column = Column.new() | |
puts column.set_worksheet_column_width |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Ungroup worksheet columns. | |
def ungroup_worksheet_columns | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
first_index = 0 | |
last_index = 2 | |
response = @cells_api.post_ungroup_worksheet_columns(file_name, sheet_name, first_index, last_index) | |
end | |
end | |
column = Column.new() | |
puts column.ungroup_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Column | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unhide worksheet columns. | |
def unhide_worksheet_columns | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
startcolumn = 0 | |
total_columns = 2 | |
response = @cells_api.post_unhide_worksheet_columns(file_name, sheet_name, startcolumn, total_columns) | |
end | |
end | |
column = Column.new() | |
puts column.unhide_worksheet_columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Comment | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add worksheet's cell comment. | |
def add_worksheet_cell_comment | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_name = "D18" | |
comment = Comment.new | |
comment.html_note = "<Font Style=\"FONT-WEIGHT: bold;FONT-FAMILY: Calibri;FONT-SIZE: 9pt;COLOR: 000000;TEXT-ALIGN: left;\">Sohail:</Font><Font Style=\"FONT-FAMILY: Calibri;FONT-SIZE: 9pt;COLOR: 000000;TEXT-ALIGN: left;\">\nShopping</Font>" | |
comment.cell_name = "D18" | |
response = @cells_api.put_work_sheet_comment(file_name, sheet_name, cell_name, comment) | |
end | |
end | |
comment = Comment.new() | |
puts comment.add_worksheet_cell_comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Comment | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet's cell comment. | |
def delete_work_sheet_comments | |
file_name = "test_cells.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.delete_work_sheet_comments(file_name, sheet_name) | |
end | |
end | |
comment = Comment.new() | |
puts comment.delete_work_sheet_comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Comment | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet's cell comment. | |
def delete_worksheet_cell_comment | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_name = "D19" | |
response = @cells_api.delete_work_sheet_comment(file_name, sheet_name, cell_name) | |
end | |
end | |
comment = Comment.new() | |
puts comment.delete_worksheet_cell_comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Comment | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet comment by cell name. | |
def get_worksheet_comment_by_cell_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_name = "A4" | |
response = @cells_api.get_work_sheet_comment(file_name, sheet_name, cell_name) | |
end | |
end | |
comment = Comment.new() | |
puts comment.get_worksheet_comment_by_cell_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Comment | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet comments. | |
def get_worksheet_comments | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
response = @cells_api.get_work_sheet_comments(file_name, sheet_name) | |
end | |
end | |
comment = Comment.new() | |
puts comment.get_worksheet_comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Comment | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update worksheet's cell comment. | |
def update_worksheet_cell_comment | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
cell_name = "A4" | |
comment = Comment.new | |
comment.auto_size = true | |
comment.note = "aspose" | |
response = @cells_api.post_work_sheet_comment(file_name, sheet_name, cell_name, comment) | |
end | |
end | |
comment = Comment.new() | |
puts comment.update_worksheet_cell_comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def delete_worksheet_conditional_formatting | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
index = 0 | |
response = @cells_api.delete_worksheet_conditional_formatting(file_name, sheet_name, index, opts = {}) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.delete_worksheet_conditional_formatting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def delete_worksheet_conditional_formatting_area | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
start_row = 3 | |
start_column = 3 | |
total_rows = 1 | |
total_columns = 1 | |
response = @cells_api.delete_worksheet_conditional_formatting_area(file_name, sheet_name, start_row, start_column, total_rows, total_columns, opts = {}) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.delete_worksheet_conditional_formatting_area |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def delete_worksheet_conditional_formattings | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
response = @cells_api.delete_worksheet_conditional_formattings(file_name, sheet_name, opts = {}) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.delete_worksheet_conditional_formattings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def get_worksheet_conditional_formatting | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
index = 0 | |
response = @cells_api.get_worksheet_conditional_formatting(file_name, sheet_name, index) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.get_worksheet_conditional_formatting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def get_worksheet_conditional_formattings | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
response = @cells_api.get_worksheet_conditional_formattings(file_name, sheet_name) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.get_worksheet_conditional_formattings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_format_condition | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
index = 0 | |
cell_area = "A1:C3" | |
type = "Expression" | |
operator_type = "Between" | |
formula1 = "v1" | |
formula2 = "v2" | |
response = @cells_api.put_worksheet_format_condition(file_name, sheet_name, index, cell_area, type, operator_type, formula1, formula2) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.put_worksheet_format_condition |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_format_condition_area | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
index = 0 | |
cell_area = "A1:C3" | |
response = @cells_api.put_worksheet_format_condition_area(file_name, sheet_name, index, cell_area) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.put_worksheet_format_condition_area |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Cloud | |
require 'aspose_cells_cloud' | |
class ConditionalFormatting | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Clear cells contents. | |
def put_worksheet_format_condition_condition | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet1" | |
index = 0 | |
type = "CellValue" | |
operator_type = "Equal" | |
formula1 = "v1" | |
formula2 = "v2" | |
response = @cells_api.put_worksheet_format_condition_condition(file_name, sheet_name, index, type, operator_type, formula1, formula2) | |
end | |
end | |
conditional_formatting = ConditionalFormatting.new() | |
puts conditional_formatting.put_worksheet_format_condition_condition |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set/create document property. | |
def create_document_property | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
property_name = "Title" | |
cells_document_property = CellsDocumentProperty.new | |
cells_document_property.name = "Title" | |
cells_document_property.value = "Tax Reforms" | |
response = @cells_api.put_document_property(file_name, property_name, cells_document_property) | |
end | |
end | |
document = Document.new() | |
puts document.create_document_property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Decrypt document | |
def decrypt_document | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
encryption_request = WorkbookEncryptionRequest.new | |
encryption_request.password = "password1234" | |
response = @cells_api.delete_decrypt_document(file_name, encryption_request) | |
end | |
end | |
document = Document.new() | |
puts document.decrypt_document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete all custom document properties and clean built-in ones. | |
def delete_document_properties | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.delete_document_properties(file_name) | |
end | |
end | |
document = Document.new() | |
puts document.delete_document_properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete document property. | |
def delete_document_property | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
property_name = "author" | |
response = @cells_api.delete_document_property(file_name, property_name) | |
end | |
end | |
document = Document.new() | |
puts document.delete_document_property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Encrypt document. | |
def encrypt_document | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
encryption_request = WorkbookEncryptionRequest.new | |
encryption_request.encryption_type = "EnhancedCryptographicProviderV1" | |
encryption_request.password = "password1234" | |
encryption_request.key_length = 128 | |
response = @cells_api.post_encrypt_document(file_name, encryption_request) | |
end | |
end | |
document = Document.new() | |
puts document.encrypt_document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Protect document. | |
def protect_document | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
protection_request = WorkbookProtectionRequest.new | |
protection_request.protection_type = "All" | |
protection_request.password = "password1234" | |
response = @cells_api.post_protect_document(file_name, protection_request) | |
end | |
end | |
document = Document.new() | |
puts document.protect_document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Protect document from changes. | |
def protect_document_from_changes | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
password_request = PasswordRequest.new | |
password_request.password = "aspose" | |
response = @cells_api.put_document_protect_from_changes(file_name, password_request) | |
end | |
end | |
document = Document.new() | |
puts document.protect_document_from_changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read document properties. | |
def read_document_properties | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_document_properties(file_name) | |
end | |
end | |
document = Document.new() | |
puts document.read_document_properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read document property by name. | |
def read_document_property_by_name | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
property_name = "Title" | |
response = @cells_api.get_document_property(file_name, property_name) | |
end | |
end | |
document = Document.new() | |
puts document.read_document_property_by_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unprotect document. | |
def unprotect_document | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
protection_request = WorkbookProtectionRequest.new | |
protection_request.password = "password1234" | |
response = @cells_api.delete_un_protect_document(file_name, protection_request) | |
end | |
end | |
document = Document.new() | |
puts document.unprotect_document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Document | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unprotect document from changes. | |
def unprotect_document_from_changes | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
response = @cells_api.delete_document_un_protect_from_changes(file_name) | |
end | |
end | |
document = Document.new() | |
puts document.unprotect_document_from_changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Hyperlink | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add worksheet hyperlink. | |
def add_worksheet_hyperlink | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
first_row = 1 | |
first_column = 1 | |
total_rows = 2 | |
total_columns = 2 | |
address = "http://www.aspose.com/" | |
response = @cells_api.put_work_sheet_hyperlink(file_name, sheet_name, first_row, first_column, total_rows, total_columns, address) | |
end | |
end | |
hyperlink = Hyperlink.new() | |
puts hyperlink.add_worksheet_hyperlink |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Hyperlink | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete all hyperlinks in worksheet. | |
def delete_all_hyperlinks_in_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
response = @cells_api.delete_work_sheet_hyperlinks(file_name, sheet_name) | |
end | |
end | |
hyperlink = Hyperlink.new() | |
puts hyperlink.delete_all_hyperlinks_in_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Hyperlink | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet hyperlink by index. | |
def delete_worksheet_hyperlink_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
hyperlink_index = 0 | |
response = @cells_api.delete_work_sheet_hyperlink(file_name, sheet_name, hyperlink_index) | |
end | |
end | |
hyperlink = Hyperlink.new() | |
puts hyperlink.delete_worksheet_hyperlink_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Hyperlink | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet hyperlink by index. | |
def get_worksheet_hyperlink_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
hyperlink_index = 0 | |
response = @cells_api.get_work_sheet_hyperlink(file_name, sheet_name, hyperlink_index) | |
end | |
end | |
hyperlink = Hyperlink.new() | |
puts hyperlink.get_worksheet_hyperlink_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Hyperlink | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet hyperlinks. | |
def get_worksheet_hyperlinks | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
response = @cells_api.get_work_sheet_hyperlinks(file_name, sheet_name) | |
end | |
end | |
hyperlink = Hyperlink.new() | |
puts hyperlink.get_worksheet_hyperlinks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Hyperlink | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update worksheet hyperlink by index | |
def update_worksheet_hyperlink_by_index | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
hyperlink_index = 0 | |
hyperlink = Hyperlink.new | |
area = CellArea.new | |
area.start_row = 1 | |
area.start_column = 1 | |
area.end_row = 3 | |
area.end_column = 3 | |
hyperlink.area = area | |
hyperlink.address = "http://www.aspose.com/" | |
hyperlink.text_to_display = "Aspose" | |
response = @cells_api.post_work_sheet_hyperlink(file_name, sheet_name, hyperlink_index, hyperlink) | |
end | |
end | |
hyperlink = Hyperlink.new() | |
puts hyperlink.update_worksheet_hyperlink_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class ListObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Sort table's data. | |
def post_sort_table_data | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "sheet7" | |
list_object_index = 1 | |
data_sorter = DataSorter.new | |
data_sorter.case_sensitive = true | |
sort_key = SortKey.new | |
sort_key.key = 1 | |
sort_key.sort_order = "Ascending" | |
data_sorter.key_list = [sort_key] | |
response = @cells_api.post_sort_table_data(file_name, sheet_name, list_object_index, data_sorter, opts = {}) | |
end | |
end | |
listObject = ListObject.new() | |
puts listObject.post_sort_table_data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add OLE object | |
def add_ole_object | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
source_file_name = "Sample_Book2.xls" | |
upload_file(source_file_name) | |
image_file_name = "aspose-logo.png" | |
upload_file(image_file_name) | |
sheet_name = "Sheet1" | |
ole_object = DrawingOleObject.new | |
ole_object.source_full_name = source_file_name | |
ole_object.image_source_full_name = image_file_name | |
ole_object.upper_left_row = 15 | |
ole_object.upper_left_column = 5 | |
ole_object.top = 10 | |
ole_object.left = 10 | |
ole_object.height = 400 | |
ole_object.width = 400 | |
ole_object.is_auto_size = true | |
response = @cells_api.put_worksheet_ole_object(file_name, sheet_name, ole_object) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.add_ole_object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete OLE object | |
def delete_ole_object | |
file_name = "Embeded_OleObject_Sample_Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
ole_object_index = 0 | |
response = @cells_api.delete_worksheet_ole_object(file_name, sheet_name, ole_object_index) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.delete_ole_object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def delete_worksheet_ole_objects | |
file_name = "Embeded_OleObject_Sample_Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.delete_worksheet_ole_objects(file_name, sheet_name) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.delete_worksheet_ole_objects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get OLE object in specified format | |
def get_ole_object_in_specified_format | |
file_name = "Embeded_OleObject_Sample_Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
object_number = 0 | |
format = "png" | |
response = @cells_api.get_worksheet_ole_object_with_format(file_name, sheet_name, object_number, format) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.get_ole_object_in_specified_format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get OLE object info. | |
def get_ole_object_info | |
file_name = "Embeded_OleObject_Sample_Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
object_number = 0 | |
response = @cells_api.get_worksheet_ole_object(file_name, sheet_name, object_number) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.get_ole_object_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet OLE objects info. | |
def get_worksheet_ole_objects_info | |
file_name = "Embeded_OleObject_Sample_Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_worksheet_ole_objects(file_name, sheet_name) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.get_worksheet_ole_objects_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class OLEObject | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update OLE object. | |
def update_ole_object | |
file_name = "Embeded_OleObject_Sample_Book1.xlsx" | |
upload_file(file_name) | |
source_file_name = "Sample_Book2.xls" | |
image_file_name = "aspose-logo.png" | |
sheet_name = "Sheet1" | |
ole_object_index = 0 | |
ole_object = DrawingOleObject.new | |
ole_object.source_full_name = source_file_name | |
ole_object.image_source_full_name = image_file_name | |
ole_object.upper_left_row = 15 | |
ole_object.upper_left_column = 5 | |
ole_object.top = 10 | |
ole_object.left = 10 | |
ole_object.height = 400 | |
ole_object.width = 400 | |
ole_object.is_auto_size = true | |
response = @cells_api.post_update_worksheet_ole_object(file_name, sheet_name, ole_object_index, ole_object) | |
end | |
end | |
oleObject = OLEObject.new() | |
puts oleObject.update_ole_object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add a new worksheet picture. | |
def add_a_new_worksheet_picture | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
picture_path = "aspose-cloud.png" | |
upload_file(picture_path) | |
sheet_name = "Sheet6" | |
upperLeftRow = 5 | |
upperLeftColumn = 5 | |
lowerRightRow = 10 | |
lowerRightColumn = 10 | |
response = @cells_api.put_worksheet_add_picture(file_name, sheet_name, picture_path, {upperLeftRow: 5, upperLeftColumn: 5, lowerRightRow: 10, lowerRightColumn: 10}) | |
end | |
end | |
picture = Picture.new() | |
puts picture.add_a_new_worksheet_picture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete a picture object in worksheet | |
def delete_a_picture_object_in_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet6" | |
picture_index = 0 | |
response = @cells_api.delete_worksheet_picture(file_name, sheet_name, picture_index) | |
end | |
end | |
picture = Picture.new() | |
puts picture.delete_a_picture_object_in_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete all pictures in worksheet. | |
def delete_all_pictures_in_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet6" | |
response = @cells_api.delete_work_sheet_pictures(file_name, sheet_name) | |
end | |
end | |
picture = Picture.new() | |
puts picture.delete_all_pictures_in_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet picture by number. | |
def read_worksheet_picture_by_number | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet6" | |
picture_number = 0 | |
response = @cells_api.get_worksheet_picture(file_name, sheet_name, picture_number) | |
end | |
end | |
picture = Picture.new() | |
puts picture.read_worksheet_picture_by_number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet picture in specified format | |
def read_worksheet_picture_in_specified_format | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet6" | |
picture_number = 0 | |
format = "png" | |
response = @cells_api.get_worksheet_picture_with_format(file_name, sheet_name, picture_number, format) | |
end | |
end | |
picture = Picture.new() | |
puts picture.read_worksheet_picture_in_specified_format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet pictures. | |
def read_worksheet_pictures | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet6" | |
response = @cells_api.get_worksheet_pictures(file_name, sheet_name) | |
end | |
end | |
picture = Picture.new() | |
puts picture.read_worksheet_pictures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Picture | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update worksheet picture by index. | |
def update_worksheet_picture_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
pic_name = "aspose-cloud.png" | |
upload_file(pic_name) | |
sheet_name = "Sheet6" | |
picture_index = 0 | |
picture = DrawingPicture.new | |
picture.name = pic_name | |
picture.rotation_angle = 90 | |
response = @cells_api.post_work_sheet_picture(file_name, sheet_name, picture_index, picture) | |
end | |
end | |
picture = Picture.new() | |
puts picture.update_worksheet_picture_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add a pivot table into worksheet. | |
def add_a_pivot_table_into_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
create_pivot_table_request = CreatePivotTableRequest.new | |
create_pivot_table_request.name = "MyPivot" | |
create_pivot_table_request.source_data = "A5:E10" | |
create_pivot_table_request.dest_cell_name = "H20" | |
create_pivot_table_request.use_same_source = true | |
create_pivot_table_request.pivot_field_rows = [1] | |
create_pivot_table_request.pivot_field_columns = [1] | |
create_pivot_table_request.pivot_field_data = [1] | |
response = @cells_api.put_worksheet_pivot_table(file_name, sheet_name, create_pivot_table_request) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.add_a_pivot_table_into_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add pivot field into pivot table | |
def add_pivot_field_into_pivot_table | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivot_table_index = 0 | |
pivot_field_type = "Row" | |
pivot_table_field_request = PivotTableFieldRequest.new | |
pivot_table_field_request.data = [1, 2] | |
response = @cells_api.put_pivot_table_field(file_name, sheet_name, pivot_table_index, pivot_field_type, pivot_table_field_request) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.add_pivot_field_into_pivot_table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Calculates pivottable's data to cells. | |
def calculate_pivottable_data_to_cells | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivot_table_index = 0 | |
response = @cells_api.post_worksheet_pivot_table_calculate(file_name, sheet_name, pivot_table_index) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.calculate_pivottable_data_to_cells |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete pivot field into pivot table | |
def delete_pivot_table_field | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivot_table_index = 0 | |
pivot_field_type = "Row" | |
pivot_table_field_request = PivotTableFieldRequest.new | |
pivot_table_field_request.data = [1, 2] | |
response = @cells_api.delete_pivot_table_field(file_name, sheet_name, pivot_table_index, pivot_field_type, pivot_table_field_request) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.delete_pivot_table_field |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet pivot table by index | |
def delete_worksheet_pivot_table_by_index | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
response = @cells_api.delete_worksheet_pivot_tables(file_name, sheet_name) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.delete_worksheet_pivot_table_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet pivot tables | |
def delete_worksheet_pivot_tables | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
response = @cells_api.delete_worksheet_pivot_tables(file_name, sheet_name) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.delete_worksheet_pivot_tables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get pivot field into pivot table | |
def get_pivot_table_field | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivot_table_index = 0 | |
pivot_field_index = 0 | |
pivot_field_type = "Row" | |
response = @cells_api.get_pivot_table_field(file_name, sheet_name, pivot_table_index, pivot_field_index, pivot_field_type) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.get_pivot_table_field |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet pivottable info by index. | |
def get_worksheet_pivot_table_info_by_index | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivottable_index = 0 | |
response = @cells_api.get_worksheet_pivot_table(file_name, sheet_name, pivottable_index) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.get_worksheet_pivot_table_info_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet pivottables info. | |
def get_worksheet_pivot_tables_info | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
response = @cells_api.get_worksheet_pivot_tables(file_name, sheet_name) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.get_worksheet_pivot_tables_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update cell style for pivot table | |
def update_cell_style_for_pivot_table | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivot_table_index = 0 | |
column = 1 | |
row = 1 | |
style = Style.new | |
font = Font.new | |
font.name = "Arial" | |
font.size = 10 | |
style.font = font | |
response = @cells_api.post_pivot_table_cell_style(file_name, sheet_name, pivot_table_index, column, row, style) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.update_cell_style_for_pivot_table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class PivotTable | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update style for pivot table | |
def update_style_for_pivot_table | |
file_name = "Sample_Pivot_Table_Example.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
pivot_table_index = 0 | |
style = Style.new | |
font = Font.new | |
font.name = "Arial" | |
font.size = 10 | |
style.font = font | |
response = @cells_api.post_pivot_table_style(file_name, sheet_name, pivot_table_index, style) | |
end | |
end | |
pivotTable = PivotTable.new() | |
puts pivotTable.update_style_for_pivot_table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Copy worksheet rows. | |
def copy_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
source_row_index = 5 | |
destination_row_index = 7 | |
row_number = 3 | |
response = @cells_api.post_copy_worksheet_rows(file_name, sheet_name, source_row_index, destination_row_index, row_number) | |
end | |
end | |
row = Row.new() | |
puts row.copy_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet row. | |
def delete_worksheet_row | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row_index = 1 | |
response = @cells_api.delete_worksheet_row(file_name, sheet_name, row_index) | |
end | |
end | |
row = Row.new() | |
puts row.delete_worksheet_row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def delete_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
startrow = 2 | |
response = @cells_api.delete_worksheet_rows(file_name, sheet_name, startrow, {totalRows: 5, updateReference: true}) | |
end | |
end | |
row = Row.new() | |
puts row.delete_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Group worksheet rows. | |
def group_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
first_index = 1 | |
last_index = 5 | |
response = @cells_api.post_group_worksheet_rows(file_name, sheet_name, first_index, last_index, {hide: false}) | |
end | |
end | |
row = Row.new() | |
puts row.group_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Hide worksheet rows. | |
def hide_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
startrow = 1 | |
total_rows = 5 | |
response = @cells_api.post_hide_worksheet_rows(file_name, sheet_name, startrow, total_rows) | |
end | |
end | |
row = Row.new() | |
puts row.hide_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Insert new worksheet row. | |
def insert_new_worksheet_row | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row_index = 10 | |
response = @cells_api.put_insert_worksheet_row(file_name, sheet_name, row_index) | |
end | |
end | |
row = Row.new() | |
puts row.insert_new_worksheet_row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Insert several new worksheet rows. | |
def insert_new_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
startrow = 10 | |
response = @cells_api.put_insert_worksheet_rows(file_name, sheet_name, startrow, {totalRows: 10, updateReference: true}) | |
end | |
end | |
row = Row.new() | |
puts row.insert_new_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet row data by row's index. | |
def read_worksheet_row_data | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row_index = 1 | |
response = @cells_api.get_worksheet_row(file_name, sheet_name, row_index) | |
end | |
end | |
row = Row.new() | |
puts row.read_worksheet_row_data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet rows info. | |
def read_worksheet_rows_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_worksheet_rows(file_name, sheet_name) | |
end | |
end | |
row = Row.new() | |
puts row.read_worksheet_rows_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set row style. | |
def set_row_style | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row_index = 1 | |
row_style = Style.new | |
background_color = Color.new | |
background_color.a = "1" | |
background_color.r = "245" | |
background_color.g = "200" | |
background_color.b = "178" | |
row_style.background_color = background_color | |
response = @cells_api.post_row_style(file_name, sheet_name, row_index, row_style) | |
end | |
end | |
row = Row.new() | |
puts row.set_row_style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Ungroup worksheet rows. | |
def ungroup_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
first_index = 1 | |
last_index = 5 | |
response = @cells_api.post_ungroup_worksheet_rows(file_name, sheet_name, first_index, last_index, {isAll: true}) | |
end | |
end | |
row = Row.new() | |
puts row.ungroup_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unhide worksheet rows. | |
def unhide_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
startrow = 1 | |
total_rows = 3 | |
response = @cells_api.post_unhide_worksheet_rows(file_name, sheet_name, startrow, total_rows, {height: 30.0}) | |
end | |
end | |
row = Row.new() | |
puts row.unhide_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Row | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update worksheet row. | |
def update_worksheet_row | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row_index = 1 | |
response = @cells_api.post_update_worksheet_row(file_name, sheet_name, row_index, {height: 25.0}) | |
end | |
end | |
row = Row.new() | |
puts row.update_worksheet_row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Autofit workbook rows. | |
def autofit_workbook_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
auto_fitter_options = AutoFitterOptions.new | |
auto_fitter_options.auto_fit_merged_cells = true | |
auto_fitter_options.ignore_hidden = true | |
response = @cells_api.post_autofit_workbook_rows(file_name, auto_fitter_options, {startRow: 1, endRow: 300, onlyAuto: true}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.autofit_workbook_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Calculate all formulas in workbook. | |
def calculate_all_formulas_in_workbook | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.post_workbook_calculate_formula(file_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.calculate_all_formulas_in_workbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert document and save result to storage. | |
def convert_document_and_save_result_to_storage | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
save_options = SavingSaveOptions.new | |
save_options.clear_data = true | |
response = @cells_api.post_document_save_as(file_name, save_options, {newfilename: "updatedWorkbook.xlsx", isAutoFitRows: true, isAutoFitColumns: true}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.convert_document_and_save_result_to_storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert Excel Workbook to Different File Formats. | |
def convert_excel_workbook_to_different_file_formats | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_work_book_with_format(file_name, "pdf") | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.convert_excel_workbook_to_different_file_formats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert workbook from request content to some format. | |
def convert_workbook_from_request_content | |
file_name = "myWorkbook.xlsx" | |
convert_to_format = "pdf" | |
response = @cells_api.put_convert_work_book(File.open("../../../data/" << file_name,"r") { |io| io.read }, {format: convert_to_format}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.convert_workbook_from_request_content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Create new workbook using different methods. | |
def create_new_workbook | |
response = @cells_api.put_workbook_create("newworkbook.xlsx") | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.put_workbook_create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def get_workbook_settings | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_workbook_settings(file_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.get_workbook_settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Import data to workbook. | |
def import_data_to_workbook | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
import_option = ImportDataImportOption.new | |
import_option.destination_worksheet = "Sheet3" | |
import_option.is_insert = true | |
response = @cells_api.post_import_data(file_name, import_option) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.import_data_to_workbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Merge workbooks. | |
def merge_workbooks | |
file_name = "Sample_Book1.xlsx" | |
upload_file(file_name) | |
merge_with = "Sample_Book2.xls" | |
upload_file(merge_with) | |
response = @cells_api.post_workbooks_merge(file_name, merge_with) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.merge_workbooks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert document and save result to storage. | |
def post_document_save_as | |
file_name = "SAASCELLS-157-6.xltx" | |
upload_file(file_name) | |
pdf_save_options = PdfSaveOptions.new | |
pdf_save_options.calculate_formula = true | |
pdf_save_options.check_font_compatibility = false | |
pdf_save_options.compliance = "None" | |
pdf_save_options.one_page_per_sheet = false | |
pdf_save_options.save_format = "PDF" | |
response = @cells_api.post_document_save_as(file_name, pdf_save_options, {newfilename: "SAASCELLS-157-6.pdf"}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.post_document_save_as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Import data to workbook. | |
def post_import_data | |
import_batch_data_option = ImportBatchDataOption.new | |
import_batch_data_option.destination_worksheet = "Sheet1" | |
import_batch_data_option.is_insert = false | |
import_batch_data_option.import_data_type = "BatchData" | |
import_source = ImportSource.new | |
import_source.file_source_type = "CloudFileSystem" | |
import_source.file_path = "Batch_data_json.txt" | |
import_batch_data_option.source = import_source | |
import_string_array_option = ImportStringArrayOption.new | |
import_string_array_option.first_row = 1 | |
import_string_array_option.first_column = 2 | |
import_string_array_option.is_vertical = true | |
import_string_array_option.destination_worksheet = "Sheet1" | |
import_string_array_option.is_insert = true | |
import_string_array_option.import_data_type = "StringArray" | |
import_source = ImportSource.new | |
import_source.file_source_type = "CloudFileSystem" | |
import_source.file_path = "Array_string_json.txt" | |
import_string_array_option.source = import_source | |
import_int_array_option = ImportIntArrayOption.new | |
import_int_array_option.first_row = 1 | |
import_int_array_option.first_column = 2 | |
import_int_array_option.is_vertical = true | |
import_int_array_option.destination_worksheet = "Sheet1" | |
import_int_array_option.is_insert = true | |
import_int_array_option.import_data_type = "IntArray" | |
import_source = ImportSource.new | |
import_source.file_source_type = "CloudFileSystem" | |
import_source.file_path = "Array_int_json.txt" | |
import_int_array_option.source = import_source | |
import_double_array_option = ImportDoubleArrayOption.new | |
import_double_array_option.first_row = 1 | |
import_double_array_option.first_column = 2 | |
import_double_array_option.is_vertical = true | |
import_double_array_option.destination_worksheet = "Sheet1" | |
import_double_array_option.is_insert = true | |
import_double_array_option.import_data_type = "DoubleArray" | |
import_source = ImportSource.new | |
import_source.file_source_type = "CloudFileSystem" | |
import_source.file_path = "Array_double_json.txt" | |
import_double_array_option.source = import_source | |
import_data_options = [import_batch_data_option, import_string_array_option, import_int_array_option, import_double_array_option] | |
data_files = ["Batch_data_json.txt", "Array_string_json.txt", "Array_int_json.txt", "Array_double_json.txt"] | |
import_data_options.each_with_index { |option, index| | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
data_file = data_files.at(index) | |
upload_file(data_file) | |
response = @cells_api.post_import_data(file_name, option) | |
} | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.post_import_data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Import data to workbook. | |
def post_import_data_without_using_storage | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
import_batch_data_option = ImportBatchDataOption.new | |
import_batch_data_option.destination_worksheet = "Sheet1" | |
import_batch_data_option.is_insert = false | |
import_batch_data_option.import_data_type = "BatchData" | |
import_source = ImportSource.new | |
import_source.file_source_type = "RequestFiles" | |
import_source.file_path = "Batch_data_json.txt" | |
import_batch_data_option.source = import_source | |
file = File.open("../../../data/Batch_data_json.txt","r") { |io| io.read } | |
response = @cells_api.post_import_data(file_name, import_batch_data_option, {file: file}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.post_import_data_without_using_storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def post_run_task | |
file_name = "TaskBook.xlsx" | |
upload_file(file_name) | |
tasks_data = TasksData.new | |
# First Task | |
task_description_1 = TaskDescription.new | |
task_description_1.task_type = "ImportData" | |
import_data_task_parameter = ImportDataTaskParameter.new | |
workbook = ImportSource.new | |
workbook.file_source_type = "CloudFileSystem" | |
workbook.file_path = "TaskBook.xlsx" | |
import_data_task_parameter.workbook = workbook | |
import_batch_data_option = ImportBatchDataOption.new | |
import_batch_data_option.destination_worksheet = "Sheet1" | |
import_batch_data_option.is_insert = true | |
source = ImportSource.new | |
source.file_source_type = "RequestFiles" | |
source.file_path = "Batch_data_xml.txt" | |
import_batch_data_option.source = source | |
import_data_task_parameter.import_batch_data_option = import_batch_data_option | |
task_description_1.import_data_task_parameter = import_data_task_parameter | |
# Second Task | |
task_description_2 = TaskDescription.new | |
task_description_2.task_type = "ImportData" | |
import_data_task_parameter = ImportDataTaskParameter.new | |
workbook = ImportSource.new | |
workbook.file_source_type = "InMemoryFiles" | |
workbook.file_path = "TaskBook.xlsx" | |
import_data_task_parameter.workbook = workbook | |
import_batch_data_option = ImportBatchDataOption.new | |
import_batch_data_option.destination_worksheet = "Sheet2" | |
import_batch_data_option.is_insert = true | |
source = ImportSource.new | |
source.file_source_type = "RequestFiles" | |
source.file_path = "Batch_data_xml_2.txt" | |
import_batch_data_option.source = source | |
import_data_task_parameter.import_batch_data_option = import_batch_data_option | |
task_description_2.import_data_task_parameter = import_data_task_parameter | |
# Third task | |
task_description_3 = TaskDescription.new | |
task_description_3.task_type = "ImportData" | |
save_result_task_parameter = SaveResultTaskParameter.new | |
save_result_task_parameter.result_source = "InMemoryFiles" | |
result_destination = ResultDestination.new | |
result_destination.destination_type = "CloudFileSystem" | |
result_destination.input_file = "TaskBook.xlsx" | |
result_destination.output_file = "ImpDataBook.xlsx" | |
save_result_task_parameter.result_destination = result_destination | |
task_description_3.save_result_task_parameter = save_result_task_parameter | |
tasks_data.tasks = [task_description_1, task_description_2, task_description_3] | |
file1 = File.open("../../../data/Batch_data_xml.txt","r") { |io| io.read } | |
file2 = File.open("../../../data/Batch_data_xml_2.txt","r") { |io| io.read } | |
files = [file1, file2] | |
response = @cells_api.post_run_task(tasks_data, files) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.post_run_task |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def post_workbook_calculate_formula | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
ignore_error = true | |
calculation_options = CalculationOptions.new | |
calculation_options.calc_stack_size = 1 | |
response = @cells_api.post_workbook_calculate_formula(file_name, calculation_options, ignore_error) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.post_workbook_calculate_formula |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert workbook from request content to some format. | |
def put_convert_work_book | |
file_name = "Book1.xlsx" | |
convert_to_format = "pdf" | |
response = @cells_api.put_convert_work_book(File.open("../../../data/" << file_name,"r") { |io| io.read }, {format: convert_to_format}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.put_convert_work_book |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert workbook from request content to some format. | |
def put_convert_work_book_with_additional_settings | |
file_name = "Book1.xlsx" | |
convert_to_format = "pdf" | |
pdf_save_options = PdfSaveOptions.new | |
pdf_save_options.calculate_formula = true | |
pdf_save_options.check_font_compatibility = false | |
pdf_save_options.compliance = "None" | |
pdf_save_options.one_page_per_sheet = false | |
pdf_save_options.save_format = "PDF" | |
response = @cells_api.put_convert_work_book(File.open("../../../data/" << file_name,"r") { |io| io.read }, {format: convert_to_format, save_options: pdf_save_options}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.put_convert_work_book_with_additional_settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read workbook default style info. | |
def read_workbook_default_style_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_work_book_default_style(file_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.read_workbook_default_style_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read workbook info or export. | |
def read_workbook_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_work_book(file_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.read_workbook_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read workbook's name. | |
def read_workbook_name | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
name_name = "TestRange" | |
response = @cells_api.get_work_book_name(file_name, name_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.read_workbook_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read workbook's names. | |
def read_workbook_names | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
response = @cells_api.get_work_book_names(file_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.read_workbook_names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read workbook's text items. | |
def read_workbook_text_items | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_work_book_text_items(file_name) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.read_workbook_text_items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Replace text. | |
def replace_text | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
old_value = "Averages" | |
new_value = "Median" | |
response = @cells_api.post_workbooks_text_replace(file_name, old_value, new_value) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.replace_text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Search text. | |
def search_text | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
text = "aspose" | |
response = @cells_api.post_workbooks_text_search(file_name, text) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.search_text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Smart marker processing result. | |
def smart_marker_processing_result | |
file_name = "Sample_SmartMarker.xlsx" | |
upload_file(file_name) | |
data_file = "Sample_SmartMarker_Data.xml" | |
response = @cells_api.post_workbook_get_smart_marker_result(file_name, File.open("../../../data/" << data_file,"r") { |io| io.read }) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.smart_marker_processing_result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Split workbook. | |
def split_workbook | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
response = @cells_api.post_workbook_split(file_name, {format: "png", from: 1, to: 1}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.split_workbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Workbook | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def update_workbook_settings | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
workbook_settings = WorkbookSettings.new | |
workbook_settings.auto_compress_pictures = true | |
workbook_settings.enable_macros = true | |
workbook_settings.is_h_scroll_bar_visible = false | |
response = @cells_api.post_workbook_settings(file_name, {settings: workbook_settings}) | |
end | |
end | |
workbook = Workbook.new() | |
puts workbook.update_workbook_settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add new worksheet. | |
def add_new_worksheet | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Tasks" | |
response = @cells_api.put_add_new_worksheet(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.add_new_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Add worksheet validation at index. | |
def add_worksheet_validation_at_index | |
file_name = "myWorkBook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.put_work_sheet_validation(file_name, sheet_name, {range: "A1:C10"}) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.add_worksheet_validation_at_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Autofit worksheet rows. | |
def autofit_worksheet_rows | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
auto_fitter_options = AutoFitterOptions.new | |
auto_fitter_options.auto_fit_merged_cells = true | |
auto_fitter_options.ignore_hidden = true | |
auto_fitter_options.only_auto = true | |
response = @cells_api.post_autofit_worksheet_rows(file_name, sheet_name, auto_fitter_options, {startRow: 1, endRow: 10, onlyAuto: true}) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.autofit_worksheet_rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Calculate formula value. | |
def calculate_formula_value | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
formula = "SUM(A5:A10)" | |
response = @cells_api.get_work_sheet_calculate_formula(file_name, sheet_name, formula) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.calculate_formula_value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Change worksheet visibility. | |
def change_worksheet_visibility | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
is_visible = false | |
response = @cells_api.put_change_visibility_worksheet(file_name, sheet_name, is_visible) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.change_worksheet_visibility |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Convert autoshape to Different File Formats. | |
def convert_autoshape_to_different_file_formats | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet4" | |
autoshape_number = 1 | |
format = "png" | |
response = @cells_api.get_worksheet_autoshape_with_format(file_name, sheet_name, autoshape_number, format) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.convert_autoshape_to_different_file_formats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Copy worksheet | |
def copy_worksheet | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet3" | |
source_sheet = "Sheet1" | |
response = @cells_api.post_copy_worksheet(file_name, sheet_name, source_sheet) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.copy_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def delete_work_sheet_background | |
file_name = "WorkSheetBackground_Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.delete_work_sheet_background(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.delete_work_sheet_background |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
def delete_worksheet | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet3" | |
response = @cells_api.delete_worksheet(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.delete_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Delete worksheet validation by index. | |
def delete_worksheet_validation_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet3" | |
validation_index = 0 | |
response = @cells_api.delete_work_sheet_validation(file_name, sheet_name, validation_index) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.delete_worksheet_validation_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Extract barcodes from worksheet picture. | |
def extract_barcodes_from_worksheet_picture | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet6" | |
picture_number = 0 | |
response = @cells_api.get_extract_barcodes(file_name, sheet_name, picture_number) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.extract_barcodes_from_worksheet_picture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get autoshape info. | |
def get_autoshape_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet4" | |
autoshape_number = 1 | |
response = @cells_api.get_worksheet_autoshape(file_name, sheet_name, autoshape_number) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.get_autoshape_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet autoshapes info. | |
def get_worksheet_autoshapes_info | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet4" | |
response = @cells_api.get_worksheet_autoshapes(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.get_worksheet_autoshapes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet text items. | |
def get_worksheet_text_items | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_work_sheet_text_items(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.get_worksheet_text_items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet validation by index. | |
def get_worksheet_validation_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet3" | |
validation_index = 0 | |
response = @cells_api.get_work_sheet_validation(file_name, sheet_name, validation_index) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.get_worksheet_validation_by_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Get worksheet validations. | |
def get_worksheet_validations | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet3" | |
response = @cells_api.get_work_sheet_validations(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.get_worksheet_validations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Merge cells. | |
def merge_cells | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
start_row = 0 | |
start_column = 0 | |
total_rows = 5 | |
total_columns = 2 | |
response = @cells_api.post_worksheet_merge(file_name, sheet_name, start_row, start_column, total_rows, total_columns) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.merge_cells |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Move worksheet. | |
def move_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
moving_request = WorksheetMovingRequest.new | |
moving_request.destination_worksheet = "Sheet5" | |
moving_request.position = "after" | |
response = @cells_api.post_move_worksheet(file_name, sheet_name, moving_request) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.move_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("", "") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Copy worksheet | |
def post_copy_worksheet | |
file_name = "Book1.xlsx" | |
upload_file(file_name) | |
sheet_name = "NewSheet" | |
source_sheet = "Sheet3" | |
copy_options = CopyOptions.new | |
copy_options.copy_names = true | |
response = @cells_api.post_copy_worksheet(file_name, sheet_name, source_sheet, copy_options) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.post_copy_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Protect worksheet. | |
def protect_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
protect_parameter = ProtectSheetParameter.new | |
protect_parameter.protection_type = "All" | |
protect_parameter.password = "123456" | |
response = @cells_api.put_protect_worksheet(file_name, sheet_name, protect_parameter) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.protect_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet in specified format | |
def read_worksheet_in_specified_format | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
format = "gif" | |
response = @cells_api.get_work_sheet_with_format(file_name, sheet_name, format) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.read_worksheet_in_specified_format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheet info or export. | |
def read_worksheet_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
response = @cells_api.get_work_sheet(file_name, sheet_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.read_worksheet_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Read worksheets info. | |
def read_worksheets_info | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
response = @cells_api.get_work_sheets(file_name) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.read_worksheets_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Rename worksheet | |
def rename_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
newname = "newSheet" | |
response = @cells_api.post_rename_worksheet(file_name, sheet_name, newname) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.rename_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Replace text. | |
def replace_text | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet2" | |
old_value = "aspose" | |
new_value = "aspose.com" | |
response = @cells_api.post_worsheet_text_replace(file_name, sheet_name, old_value, new_value) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.replace_text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Search text. | |
def search_text | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
text = "All" | |
response = @cells_api.post_work_sheet_text_search(file_name, sheet_name, text) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.search_text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set freeze panes | |
def set_freeze_panes | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row = 1 | |
column = 1 | |
freezed_rows = 1 | |
freezed_columns = 1 | |
response = @cells_api.put_worksheet_freeze_panes(file_name, sheet_name, row, column, freezed_rows, freezed_columns) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.set_freeze_panes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Set worksheet background image. | |
def set_worksheet_background_image | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
background_image = File.open("../../../data/Creative.jpg","r") { |io| io.read } | |
response = @cells_api.put_work_sheet_background(file_name, sheet_name, background_image) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.set_worksheet_background_image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Sort worksheet range. | |
def sort_worksheet_range | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
cell_area = "A5:A10" | |
data_sorter = DataSorter.new | |
data_sorter.case_sensitive = false | |
data_sorter.has_headers = false | |
data_sorter.sort_left_to_right = false | |
sort_key = SortKey.new | |
sort_key.key = 0 | |
sort_key.sort_order = "descending" | |
data_sorter.key_list = [sort_key] | |
response = @cells_api.post_worksheet_range_sort(file_name, sheet_name, cell_area, data_sorter) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.sort_worksheet_range |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unfreeze panes | |
def unfreeze_panes | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
row = 1 | |
column = 1 | |
freezed_rows = 1 | |
freezed_columns = 1 | |
response = @cells_api.delete_worksheet_freeze_panes(file_name, sheet_name, row, column, freezed_rows, freezed_columns) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.unfreeze_panes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unmerge cells. | |
def unmerge_cells | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
start_row = 1 | |
start_column = 1 | |
total_rows = 5 | |
total_columns = 3 | |
response = @cells_api.post_worksheet_unmerge(file_name, sheet_name, start_row, start_column, total_rows, total_columns) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.unmerge_cells |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Unprotect worksheet. | |
def unprotect_worksheet | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
protect_parameter = ProtectSheetParameter.new | |
protect_parameter.protection_type = "None" | |
response = @cells_api.delete_unprotect_worksheet(file_name, sheet_name, protect_parameter) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.unprotect_worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update cell's range style. | |
def update_cell_range_style | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
range = "A1:C4" | |
style = Style.new | |
font = Font.new | |
font.double_size = 20 | |
font.is_bold = true | |
font.is_italic = true | |
font.is_strikeout = true | |
font.size = 15 | |
style.font = font | |
style.shrink_to_fit = true | |
background_color = Color.new | |
background_color.r = "255" | |
background_color.g = "255" | |
background_color.b = "255" | |
style.background_color = background_color | |
response = @cells_api.post_update_worksheet_range_style(file_name, sheet_name, range, style) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.update_cell_range_style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("APP_KEY", "APP_SID") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update worksheet property | |
def update_worksheet_property | |
file_name = "myWorkbook.xlsx" | |
upload_file(file_name) | |
sheet_name = "Sheet1" | |
worksheet = Worksheet.new | |
worksheet.type = "Worksheet" | |
worksheet.name = "sheet1" | |
worksheet.is_gridlines_visible = true | |
worksheet.is_row_column_headers_visible = true | |
worksheet.display_zeros = true | |
worksheet.display_right_to_left = true | |
worksheet.is_outline_shown = true | |
worksheet.is_selected = true | |
worksheet.transition_evaluation = true | |
worksheet.transition_entry = true | |
worksheet.is_visible = true | |
worksheet.index = 0 | |
worksheet.first_visible_row = 1 | |
worksheet.first_visible_column = 1 | |
worksheet.zoom = 80 | |
worksheet.view_type = "PageBreakPreview" | |
worksheet.is_page_break_preview = true | |
worksheet.is_ruler_visible = true | |
response = @cells_api.post_update_worksheet_property(file_name, sheet_name, worksheet) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.update_worksheet_property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud | |
require 'aspose_cells_cloud' | |
class Worksheet | |
include AsposeCellsCloud | |
include AsposeStorageCloud | |
def initialize | |
#Get App key and App SID from https://cloud.aspose.com | |
AsposeApp.app_key_and_sid("da77c9f5da014d91faf2961ecec2de66", "B01A15E5-1B83-4B9A-8EB3-0F2BFA6AC766") | |
@cells_api = CellsApi.new | |
end | |
def upload_file(file_name) | |
@storage_api = StorageApi.new | |
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } ) | |
end | |
# Update worksheet validation by index. | |
def update_worksheet_validation_by_index | |
file_name = "Sample_Test_Book.xls" | |
upload_file(file_name) | |
sheet_name = "Sheet3" | |
validation_index = 0 | |
response = @cells_api.post_work_sheet_validation(file_name, sheet_name, validation_index) | |
end | |
end | |
worksheet = Worksheet.new() | |
puts worksheet.update_worksheet_validation_by_index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment