将图片从 Excel 导出为 JPG

用于将图片导出为 JPG 文件的 Ruby 库

使用 Cells Cloud 的 Export API 在 Ruby 中导出 Excel 文件内部对象工作流。这是使用 Ruby 在线将电子表格中的图片导出为 JPG 格式文件的专业解决方案。

使用 Cells Cloud SDK for Ruby 将 PICTURE 对象导出为 JPG 格式文件

API
POST
https://api.aspose.cloud/v3.0/cells/export

将 PICTURE 对象从 Excel 文件导出为 JPG 文件是一项复杂的任务。将 PICTURE 导出为 JPG 格式转换由我们的 Ruby SDK 执行,同时保留源 PICTURE 电子表格的主要结构和逻辑内容。我们的 Ruby 库是在线将 PICTURE 对象导出为 JPG 格式文件的专业解决方案。该Cloud SDK为Ruby开发人员提供了强大的功能和完美的JPG输出。

Ruby 中的代码示例,使用 REST API 将电子表格中的图片导出为 JPG 格式

# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/
    describe 'cells_save_as_post_document_save_as test' do
        it "should work" do
            @instance = AsposeCellsCloud::LiteCellsApi.new($client_id,$client_secret,"v3.0","https://api.aspose.cloud/")
            files = {}      
            name = $DataSourceXlsx
            files[name] = ::File.open(File.expand_path("data/"+name),"r") 
            name =$AssemblyTestXlsx 
            files[name] = ::File.open(File.expand_path("data/"+name),"r")
            format = 'jpg'
            objectType =  'picture'
            result = @instance.post_export(files  ,objectType ,format)    
        end
    end

如何使用Cells Cloud SDK for Ruby将Excel PICTURE中的对象导出为JPG

  1. 注册一个帐户仪表板获取免费API配额和授权详细信息
  2. 使用您的客户端 ID、客户端密钥、基本 URL 和 API 版本初始化 Cells API。
  3. 调用post_export方法获取结果流

系统要求

  1. 红宝石 2.5 或更新版本