在 Ruby 中将 HTML 文件另存为 XLSM
     API 
         POST 
            
                https://api.aspose.cloud/v3.0/cells/{name}/SaveAs
                
            
        将 HTML 中的文件格式保存为 XLSM 是一项复杂的任务。所有 HTML 到 XLSM 格式的转换均由我们的 Ruby SDK 执行,同时保留源 HTML 电子表格的主要结构和逻辑内容。我们的 Ruby 库是在线将 HTML 保存为 XLSM 文件的专业解决方案。此 Cloud SDK 为 Ruby 开发人员提供了强大的功能和完美的 XLSM 输出。
使用 REST API 将 HTML 保存为 XLSM 的 Ruby 代码示例
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/
    require 'openssl'
    require 'bundler'
    require 'aspose_cells_cloud'
    @instance = AsposeCellsCloud::CellsApi.new(ENV['ProductClientId'],ENV['ProductClientSecret'])
    name = 'Book1.html'
    save_options = nil
    newfilename = 'Book1Saveas.xlsm'
    is_auto_fit_rows = true
    is_auto_fit_columns = true
    folder = 'Temp'
    result = @instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>(folder+"/"+newfilename), :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder})
如何使用 Cells Cloud Ruby 库将 HTML 保存为 XLSM。
- 注册一个帐户仪表板获取免费API配额和授权详细信息
- 安装 Ruby 库并将引用(导入库)添加到您的项目中。
- 在 Ruby 中打开源文件。
- 使用 `post_workbook_save_as` 方法检索结果流。
系统要求
- 红宝石 2.5 或更新版本