@@ -71,6 +71,7 @@ To get started with Aspose.Cells Cloud for Java, follow these steps:
71
71
72
72
1 . Create an account at [ Aspose for Cloud] ( https://dashboard.aspose.cloud/#/apps ) and obtain your application information.
73
73
2 . Add the following dependency to your project's POM:
74
+ 3 . You need to set your CellsCloudClientId and CellsCloudClientSecret in the environment variables.
74
75
75
76
```
76
77
<repositories>
@@ -85,22 +86,41 @@ To get started with Aspose.Cells Cloud for Java, follow these steps:
85
86
<dependency>
86
87
<groupId>com.aspose</groupId>
87
88
<artifactId>aspose-cells-cloud</artifactId>
88
- <version>25.2 .0</version>
89
+ <version>25.3 .0</version>
89
90
</dependency>
90
91
</dependencies>
91
92
```
92
93
93
94
``` 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
+ }
104
124
```
105
125
106
126
## Aspose.Cells Cloud in Popular Languages
0 commit comments