将图表从 Excel 导出到 TIFF

用于将图表导出到 TIFF 文件的 Android 库

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

使用Cells Cloud SDK for Android将CHART对象导出为TIFF格式文件

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

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

Android 中使用 REST API 将电子表格中的 CHART 导出为 TIFF 格式的代码示例

// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-android/
    import java.io.*;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Base64;
    import com.aspose.cloud.cells.api.*;
    import com.aspose.cloud.cells.model.*;
    public class Export {
        public static void main(String[] args) {
            String format = "tiff";
            String objectType = "chart";
            HashMap<String,File> fileMap = new HashMap<String,File>();
            fileMap.put("Book1.xlsx" ,new File("C:\Book1.xlsx") );
            fileMap.put("myDocument.xlsx" ,new File("C:\myDocument.xlsx") );
            try {
                LightCellsApi cellsApi = new LightCellsApi(System.getenv("ProductClientId"), System.getenv("ProductClientSecret"),"v3.0","https://api.aspose.cloud");
                FilesResult response = cellsApi.postExport(fileMap,objectType, format,null);            
                List<FileInfo> files = response.getFiles();
                String filename = files.get(0).getFilename();
                String fileContent = files.get(0).getFileContent();
                byte[] data = Base64.getDecoder().decode(fileContent);
                OutputStream outputStream = new FileOutputStream(filename);
                outputStream.write(data,0,data.length);
                outputStream.close();
            }catch(Exception exception )
            {
                System.out.print(exception);
            }
        }
    }


如何使用Cells Cloud SDK for Android将对象从Excel CHART导出到TIFF

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


系统要求

  1. Android 7 或更高版本
  2. Java(TM) SE 运行时环境