@@ -71,6 +71,7 @@ To get started with Aspose.Cells Cloud for Java, follow these steps:
7171
72721 . Create an account at [ Aspose for Cloud] ( https://dashboard.aspose.cloud/#/apps ) and obtain your application information.
73732 . Add the following dependency to your project's POM:
74+ 3 . You need to set your CellsCloudClientId and CellsCloudClientSecret in the environment variables.
7475
7576```
7677<repositories>
@@ -85,22 +86,41 @@ To get started with Aspose.Cells Cloud for Java, follow these steps:
8586 <dependency>
8687 <groupId>com.aspose</groupId>
8788 <artifactId>aspose-cells-cloud</artifactId>
88- <version>25.2 .0</version>
89+ <version>25.3 .0</version>
8990 </dependency>
9091</dependencies>
9192```
9293
9394``` Java
94- CellsApi cellsApi = new CellsApi (CellsApiUtil . GetClientId(),CellsApiUtil . GetClientSecret());
95- String localName = " cloud.png" ;
96- String remoteName = " cloud.png" ;
97- String format = " csv" ;
98- PutConvertWorkbookRequest request = new PutConvertWorkbookRequest ();
99- request. setFormat(format);
100- HashMap<String ,File > fileMap = new HashMap<String ,File > ();
101- fileMap. put(localName ,CellsApiUtil . GetFileHolder(localName) );
102- request. setFile(fileMap);
103- File response = cellsApi. putConvertWorkbook(request);
95+ package com.aspose.cloud.cells.api ;
96+ import com.aspose.cloud.cells.client.* ;
97+ import com.aspose.cloud.cells.model.* ;
98+ import com.aspose.cloud.cells.request.* ;
99+ import org.junit.Test ;
100+ import java.util.ArrayList ;
101+ import java.util.List ;
102+ import java.io.File ;
103+ import java.util.HashMap ;
104+ import junit.framework.Assert ;
105+
106+ public class ConversionTest {
107+ private String remoteFolder = " TestData/In" ;
108+ CellsApi cellsApi = new CellsApi (System . getenv(" CellsCloudClientId" ),System . getenv(" CellsCloudClientSecret" ));
109+
110+ public void putConvertWorkbook () throws Exception {
111+ private String remoteFolder = " TestData/In" ;
112+ String localName = " Book1.xlsx" ;
113+ String remoteName = " Book1.xlsx" ;
114+ String format = " csv" ;
115+ CellsApiUtil . Upload(api, remoteFolder + " /" + remoteName , localName , " " );
116+ PutConvertWorkbookRequest request = new PutConvertWorkbookRequest ();
117+ request. setFormat(format);
118+ HashMap<String ,File > fileMap = new HashMap<String ,File > ();
119+ fileMap. put(localName ,CellsApiUtil . GetFileHolder(localName) );
120+ request. setFile(fileMap);
121+ File response = this . api. putConvertWorkbook(request);
122+ }
123+ }
104124```
105125
106126## Aspose.Cells Cloud in Popular Languages
0 commit comments