#ExStart:
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

  # 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
#ExEnd:
