package com.aspose.cloud.cells.api; import com.aspose.cloud.cells.client.*; import com.aspose.cloud.cells.model.*; import com.aspose.cloud.cells.request.*; import java.io.IOException; import org.junit.Test; import java.util.ArrayList; import java.util.List; import java.io.File; import java.util.HashMap; public class Example { private CellsApi api; public Example(){ try { api = new CellsApi( System.getenv("CellsCloudClientId"), System.getenv("CellsCloudClientSecret"), "v3.0", System.getenv("CellsCloudApiBaseUrl") ); } catch (ApiException e) { e.printStackTrace(); } } public void Run(){ try{ String book1Xlsx = "Book1.xlsx"; String rotateType = "rows"; String format = "pdf"; PostReverseRequest request = new PostReverseRequest(); request.setRotateType(rotateType); request.setOutFormat(format); HashMap<String,File> fileMap = new HashMap<String,File>(); fileMap.put(book1Xlsx ,CellsApiUtil.GetFileHolder(book1Xlsx) ); request.setFile(fileMap); this.api.postReverse(request); } catch (ApiException e) { e.printStackTrace(); }catch (IOException e) { e.printStackTrace(); } } }