-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Aspose.Cells Cloud SDK 21.10
- Loading branch information
1 parent
9830f43
commit 49b14c8
Showing
4 changed files
with
164 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
|
132 changes: 132 additions & 0 deletions
132
src/androidTest/java/com/aspose/cloud/cells/api/CellsBatchApiTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
} | ||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters