Skip to content

Commit

Permalink
Release Aspose.Cells Cloud SDK 21.10
Browse files Browse the repository at this point in the history
  • Loading branch information
roywangaspose committed Nov 8, 2021
1 parent 9830f43 commit 49b14c8
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 22 deletions.
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,10 @@ Android Cloud SDK wraps Aspose.Cells Cloud API. The SDK enhances your Android ap
- Leverage the power of named ranges.


## Feature & Enhancements in Version 21.9

- Correct the return type of the following REST APIs.

Delete WorksheetDeleteChart
Post WorksheetChartLegend
Post WorksheetChartTitle
Put WorksheetAddChart
Put WorksheetChartTitle
Post WorksheetHyperlink
Put WorksheetHyperlink
Put WorksheetListObject
Put WorksheetOleObject
Post WorksheetPicture
Put WorksheetAddPicture
Put WorksheetPivotTable
Delete DocumentProperties
Delete DocumentProperty
Put DocumentProperty
Put WorksheetShape
Delete WorksheetValidation
## Feature & Enhancements in Version 21.10

- Add new API for support delete multiple worksheets in a single call.
- Add new API for supports batch convert excel files.


## Read & Write Spreadsheet Formats
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = 'com.aspose'
project.version = '21.9'
project.version = '21.10'

buildscript {
repositories {
Expand Down
132 changes: 132 additions & 0 deletions src/androidTest/java/com/aspose/cloud/cells/api/CellsBatchApiTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/*
* Web API Swagger specification
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/


package com.aspose.cloud.cells.api;
import com.aspose.cloud.cells.client.ApiClient;
import com.aspose.cloud.cells.client.ApiException;
import com.aspose.cloud.cells.client.Configuration;


import com.aspose.cloud.cells.model.CalculationOptions;
import com.aspose.cloud.cells.model.CellResponse;
import com.aspose.cloud.cells.model.CellsObjectOperateTaskParameter;
import com.aspose.cloud.cells.model.CellsResponse;
import com.aspose.cloud.cells.model.ColumnResponse;
import com.aspose.cloud.cells.model.ColumnsResponse;
import com.aspose.cloud.cells.model.FileSource;
import com.aspose.cloud.cells.model.Font;

import java.io.File;

import com.aspose.cloud.cells.model.FontSetting;
import com.aspose.cloud.cells.model.OperateObject;
import com.aspose.cloud.cells.model.OperateObjectPosition;
import com.aspose.cloud.cells.model.ResultDestination;
import com.aspose.cloud.cells.model.RowResponse;
import com.aspose.cloud.cells.model.RowsResponse;
import com.aspose.cloud.cells.model.SaveResultTaskParameter;
import com.aspose.cloud.cells.model.Style;
import com.aspose.cloud.cells.model.CellsCloudResponse;
import com.aspose.cloud.cells.model.MatchConditionRequest;
import com.aspose.cloud.cells.model.BatchConvertRequest;
import com.aspose.cloud.cells.model.WorkbookSettings;
import com.aspose.cloud.cells.model.WorkbookSettingsOperateParameter;

import org.junit.Test;
import org.junit.Ignore;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import junit.framework.Assert;

/**
* API tests for CellsApi
*/

public class CellsBatchApiTest {

private CellsApi api;

private String BOOK1 = "Book1.xlsx";
private String MYDOC = "myDocument.xlsx";
private String PivTestFile = "TestCase.xlsx";
private String TEMPFOLDER = "JavaTest";//"CellsTests";
private String SHEET1 = "Sheet1";
private String SHEET2 = "Sheet2";
private String SHEET3 = "Sheet3";
private String SHEET4 = "Sheet4";
private String SHEET5 = "Sheet5";
private String SHEET6 = "Sheet6";
private String SHEET7 = "Sheet7";
private String SHEET8 = "Sheet8";
private String CellName = "A1";
private String RANGE = "A1:C10";
private String CELLAREA = "A1:C10";
private String BatchFolder = "BatchFiles";
private String OutPut = "OutPut";
private String DataSource = "datasource.xlsx";
private String AssemblyTest = "assemblytest.xlsx";

public CellsBatchApiTest(){
try {
api = new CellsApi(CellsApiUtil.GetClientId(),CellsApiUtil.GetClientSecret(),CellsApiUtil.GetAPIVersion(),CellsApiUtil.GetBaseUrl());
} catch (ApiException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

/**
* Delete worksheet columns.
* @throws Exception
*/
@Test
public void cellsBatchConvertTest() throws Exception {
if( api.objectExists(OutPut,null,null).Exists())
{
api.deleteFolder(OutPut,null,true);
}
api.createFolder(OutPut, null);
if (api.objectExists(BatchFolder,null,null).Exists())
{
api.deleteFolder(BatchFolder, null, true);
}
api.createFolder(BatchFolder,null);
CellsApiUtil.Upload(api, BatchFolder , BOOK1);
CellsApiUtil.Upload(api, BatchFolder , MYDOC);
CellsApiUtil.Upload(api, BatchFolder , DataSource);
CellsApiUtil.Upload(api, BatchFolder , AssemblyTest);

BatchConvertRequest batchConvertRequest = new BatchConvertRequest();
batchConvertRequest.setFormat ("pdf") ;
batchConvertRequest.setSourceFolder(BatchFolder);
MatchConditionRequest matchConditionRequest = new MatchConditionRequest();
List<String> sheetnameList=new ArrayList<>();
sheetnameList.add("Book1.xlsx");
sheetnameList.add("myDocument.xlsx");

matchConditionRequest.setFullMatchConditions(sheetnameList);
batchConvertRequest.setMatchCondition(matchConditionRequest);

File response = api.postBatchConvert(batchConvertRequest);

}




}
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,33 @@ public void cellsWorksheetsGetWorkSheetForPageIndexTest()
format, verticalResolution, horizontalResolution, null,
pageIndex, folder, null);

// TODO: test validations
}
@Test
public void cellsWorksheetsDeleteWorkSheetsTest()
throws ApiException {
String name = BOOK1;
String folder = TEMPFOLDER;
MatchConditionRequest matchConditionRequest = new MatchConditionRequest();
matchConditionRequest.addFullMatchConditionsItem("Sheet1");
matchConditionRequest.addFullMatchConditionsItem("Sheet2");
CellsApiUtil.Upload(api, folder, name);

CellsCloudResponse response = api.cellsWorksheetsDeleteWorksheets(name,matchConditionRequest , folder, null);

// TODO: test validations
}
@Test
public void cellsWorksheetsDeleteWorkSheetsTest_()
throws ApiException {
String name = BOOK1;
String folder = TEMPFOLDER;
MatchConditionRequest matchConditionRequest = new MatchConditionRequest();
matchConditionRequest.setRegexPattern("Sheet[13]");
CellsApiUtil.Upload(api, folder, name);

CellsCloudResponse response = api.cellsWorksheetsDeleteWorksheets(name,matchConditionRequest , folder, null);

// TODO: test validations
}
}

0 comments on commit 49b14c8

Please sign in to comment.