# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby require 'aspose_cells_cloud' class OLEObject include AsposeCellsCloud def initialize #Get client_id and client_secret from https://cloud.aspose.com @instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl) end # Update OLE object. def update_ole_object name = $BOOK1 sheet_name = $SHEET6 ole_object_index = 0 ole = AsposeCellsCloud::OleObject.new({:Left=>10,:Right=>10,:Height=>100,:Width=>90}) folder = $TEMPFOLDER result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) }) expect(result.uploaded.size).to be > 0 result = @instance.cells_ole_objects_post_update_worksheet_ole_object(name, sheet_name, ole_object_index, { :ole=>ole,:folder=>folder}) expect(result.code).to eql(200) end end oleObject = OLEObject.new() puts oleObject.update_ole_object