Skip to content

Commit 0d45a32

Browse files
committed
Release Aspose.Cells Cloud SDK 24.8.0
1 parent 99d2c1c commit 0d45a32

17 files changed

+551
-7
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
asposecellscloud "github.com/aspose-cells-cloud/aspose-cells-cloud-go"
7+
)
8+
func main() {
9+
instance := asposecellscloud.NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"), "https://api.aspose.cloud", "v3.0")
10+
remoteFolder := "TestData/In"
11+
12+
localName := "BookText.xlsx"
13+
remoteName := "BookText.xlsx"
14+
15+
localNameRequest := new(asposecellscloud.UploadFileRequest)
16+
localNameRequest.UploadFiles = make(map[string]string)
17+
localNameRequest.UploadFiles[localName] = localName
18+
localNameRequest.Path = remoteFolder + "/" + remoteName
19+
localNameRequest.StorageName =""
20+
instance.UploadFile(localNameRequest )
21+
22+
var addTextOptionsDataSource = new(DataSource)
23+
addTextOptionsDataSource.DataSourceType = "CloudFileSystem"
24+
addTextOptionsDataSource.DataPath = "BookText.xlsx"
25+
var addTextOptions = new(AddTextOptions)
26+
addTextOptions.DataSource = addTextOptionsDataSource
27+
addTextOptions.Text = "Aspose.Cells Cloud is an excellent product."
28+
addTextOptions.Worksheet = "202401"
29+
addTextOptions.SelectPoistion = "AtTheBeginning"
30+
addTextOptions.SkipEmptyCells = true
31+
32+
request := new (asposecellscloud.PostAddTextContentRequest)
33+
request.AddTextOptions = addTextOptions
34+
_, httpResponse, err := instance.PostAddTextContent(request)
35+
if err != nil {
36+
t.Error(err)
37+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
38+
t.Fail()
39+
}
40+
}

Examples/example_PostTrimContent.go

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
asposecellscloud "github.com/aspose-cells-cloud/aspose-cells-cloud-go"
7+
)
8+
func main() {
9+
instance := asposecellscloud.NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"), "https://api.aspose.cloud", "v3.0")
10+
remoteFolder := "TestData/In"
11+
12+
localName := "BookText.xlsx"
13+
remoteName := "BookText.xlsx"
14+
15+
localNameRequest := new(asposecellscloud.UploadFileRequest)
16+
localNameRequest.UploadFiles = make(map[string]string)
17+
localNameRequest.UploadFiles[localName] = localName
18+
localNameRequest.Path = remoteFolder + "/" + remoteName
19+
localNameRequest.StorageName =""
20+
instance.UploadFile(localNameRequest )
21+
22+
var trimContentOptionsDataSource = new(DataSource)
23+
trimContentOptionsDataSource.DataSourceType = "CloudFileSystem"
24+
trimContentOptionsDataSource.DataPath = "BookText.xlsx"
25+
var trimContentOptionsScopeOptions = new(ScopeOptions)
26+
trimContentOptionsScopeOptions.Scope = "EntireWorkbook"
27+
var trimContentOptions = new(TrimContentOptions)
28+
trimContentOptions.DataSource = trimContentOptionsDataSource
29+
trimContentOptions.TrimLeading = true.
30+
trimContentOptions.TrimTrailing = true
31+
trimContentOptions.TrimSpaceBetweenWordTo1 = true
32+
trimContentOptions.RemoveAllLineBreaks = true
33+
trimContentOptions.ScopeOptions = trimContentOptionsScopeOptions
34+
35+
request := new (asposecellscloud.PostTrimContentRequest)
36+
request.TrimContentOptions = trimContentOptions
37+
_, httpResponse, err := instance.PostTrimContent(request)
38+
if err != nil {
39+
t.Error(err)
40+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
41+
t.Fail()
42+
}
43+
}

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ Enhance your Go applications with the [Aspose.Cells Cloud](https://products.aspo
2525

2626
Full list of issues covering all changes in this release:
2727

28-
- Add a new feature about adding text content.
29-
- Add get access token by client id and client secret.
30-
28+
- Add text trim feature on Cells Cloud Services.
3129

3230
## Support file format
3331

@@ -120,6 +118,11 @@ To get started with Aspose.Cells Cloud for Go, follow these steps:
120118

121119
# Release history version
122120

121+
## Feature & Enhancements in Version 24.7
122+
123+
- Add Text Trim feature on Cells Cloud Services.
124+
- Add get access token by client id and client secret.
125+
123126
## Feature & Enhancements in Version 24.6
124127

125128
- Optimize load data function of data transformation.

TestData/BookText.xlsx

12.7 KB
Binary file not shown.

api/swagger.yaml

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
swagger: "2.0"
33
info:
4-
version: "24.7"
4+
version: "24.8"
55
title: "Aspose.Cells Cloud APIs."
66
host: "api.aspose.cloud"
77
basePath: "/v3.0"
@@ -11997,6 +11997,20 @@ paths:
1199711997
type: "class:addtextoptions"
1199811998
x-nullable: true
1199911999
x-exportParamName: "addTextOptions"
12000+
/cells/trimcontent:
12001+
post:
12002+
tags:
12003+
- "Cells"
12004+
summary: ""
12005+
operationId: "PostTrimContent"
12006+
parameters:
12007+
- name: "trimcontentoptions"
12008+
in: "Body"
12009+
description: ""
12010+
required: true
12011+
type: "class:trimcontentoptions"
12012+
x-nullable: true
12013+
x-exportParamName: "trimContentOptions"
1200012014
/cells/{name}/defaultstyle:
1200112015
get:
1200212016
tags:
@@ -22140,7 +22154,25 @@ definitions:
2214022154
Name:
2214122155
type: "string"
2214222156
description: ""
22143-
SearchScopeOptionsType:
22157+
ScopeItem:
22158+
type: "object"
22159+
properties:
22160+
WorksheetName:
22161+
type: "string"
22162+
description: ""
22163+
Ranges:
22164+
type: "array<string>"
22165+
description: ""
22166+
ScopeOptions:
22167+
type: "object"
22168+
properties:
22169+
Scope:
22170+
type: "string"
22171+
description: ""
22172+
ScopeItems:
22173+
type: "array<class:scopeitem>"
22174+
description: ""
22175+
ScopeOptionsType:
2214422176
allOf:
2214522177
- type: "object"
2214622178

@@ -22152,6 +22184,39 @@ definitions:
2215222184

2215322185
properties:
2215422186

22187+
TrimContentOptions:
22188+
type: "object"
22189+
properties:
22190+
DataSource:
22191+
type: "class:datasource"
22192+
description: ""
22193+
FileInfo:
22194+
type: "class:fileinfo"
22195+
description: ""
22196+
TrimContent:
22197+
type: "string"
22198+
description: ""
22199+
TrimLeading:
22200+
type: "boolean"
22201+
description: ""
22202+
TrimTrailing:
22203+
type: "boolean"
22204+
description: ""
22205+
TrimSpaceBetweenWordTo1:
22206+
type: "boolean"
22207+
description: ""
22208+
TrimNonBreakingSpaces:
22209+
type: "boolean"
22210+
description: ""
22211+
RemoveExtraLineBreaks:
22212+
type: "boolean"
22213+
description: ""
22214+
RemoveAllLineBreaks:
22215+
type: "boolean"
22216+
description: ""
22217+
ScopeOptions:
22218+
type: "class:scopeoptions"
22219+
description: ""
2215522220
CellValue:
2215622221
type: "object"
2215722222
properties:

api_cells.go

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
)
3434

3535
func Version() {
36-
fmt.Println("---Version: 24.7---")
36+
fmt.Println("---Version: 24.8---")
3737
}
3838

3939
func NewCellsApiService(appSid string, appKey string, opts ...string) *CellsApiService {
@@ -7215,6 +7215,34 @@ func (a *CellsApiService) PostAddTextContent(data *PostAddTextContentRequest) (
72157215
}
72167216

72177217

7218+
func (a *CellsApiService) PostTrimContent(data *PostTrimContentRequest) ( FileInfo, *http.Response, error) {
7219+
var (
7220+
localVarReturnValue FileInfo
7221+
7222+
)
7223+
7224+
r, err := data.CreateRequestData(a.client);
7225+
if err != nil {
7226+
return localVarReturnValue, nil, err
7227+
}
7228+
7229+
localVarHttpResponse, err := a.client.callAPI(r)
7230+
if err != nil || localVarHttpResponse == nil {
7231+
return localVarReturnValue, localVarHttpResponse, err
7232+
}
7233+
defer localVarHttpResponse.Body.Close()
7234+
if localVarHttpResponse.StatusCode >= 300 {
7235+
bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body)
7236+
return localVarReturnValue, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes)
7237+
}
7238+
if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&localVarReturnValue); err != nil {
7239+
return localVarReturnValue, localVarHttpResponse, err
7240+
}
7241+
7242+
return localVarReturnValue, localVarHttpResponse, err
7243+
}
7244+
7245+
72187246
func (a *CellsApiService) GetWorkbookDefaultStyle(data *GetWorkbookDefaultStyleRequest) ( StyleResponse, *http.Response, error) {
72197247
var (
72207248
localVarReturnValue StyleResponse
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package asposecellscloud
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
func TestTextProcessingController_PostAddTextContent(t *testing.T) {
9+
remoteFolder := "TestData/In"
10+
11+
localName := "BookText.xlsx"
12+
remoteName := "BookText.xlsx"
13+
14+
localNameRequest := new(UploadFileRequest)
15+
localNameRequest.UploadFiles = make(map[string]string)
16+
localNameRequest.UploadFiles[localName] = GetBaseTest().localTestDataFolder + localName
17+
localNameRequest.Path = remoteFolder + "/" + remoteName
18+
localNameRequest.StorageName = ""
19+
GetBaseTest().CellsApi.UploadFile(localNameRequest)
20+
21+
var addTextOptionsDataSource = new(DataSource)
22+
addTextOptionsDataSource.DataSourceType = "CloudFileSystem"
23+
addTextOptionsDataSource.DataPath = "BookText.xlsx"
24+
var addTextOptions = new(AddTextOptions)
25+
addTextOptions.DataSource = addTextOptionsDataSource
26+
addTextOptions.Text = "Aspose.Cells Cloud is an excellent product."
27+
addTextOptions.Worksheet = "202401"
28+
addTextOptions.SelectPoistion = "AtTheBeginning"
29+
addTextOptions.SkipEmptyCells = true
30+
31+
request := new(PostAddTextContentRequest)
32+
request.AddTextOptions = addTextOptions
33+
_, httpResponse, err := GetBaseTest().CellsApi.PostAddTextContent(request)
34+
if err != nil {
35+
t.Error(err)
36+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
37+
t.Fail()
38+
} else {
39+
fmt.Printf("%d\tTestTextProcessingController_PostAddTextContent \n", GetBaseTest().GetTestNumber())
40+
}
41+
}
42+
43+
func TestTextProcessingController_PostTrimContent(t *testing.T) {
44+
remoteFolder := "TestData/In"
45+
46+
localName := "BookText.xlsx"
47+
remoteName := "BookText.xlsx"
48+
49+
localNameRequest := new(UploadFileRequest)
50+
localNameRequest.UploadFiles = make(map[string]string)
51+
localNameRequest.UploadFiles[localName] = GetBaseTest().localTestDataFolder + localName
52+
localNameRequest.Path = remoteFolder + "/" + remoteName
53+
localNameRequest.StorageName = ""
54+
GetBaseTest().CellsApi.UploadFile(localNameRequest)
55+
56+
var trimContentOptionsDataSource = new(DataSource)
57+
trimContentOptionsDataSource.DataSourceType = "CloudFileSystem"
58+
trimContentOptionsDataSource.DataPath = "BookText.xlsx"
59+
var trimContentOptionsScopeOptions = new(ScopeOptions)
60+
trimContentOptionsScopeOptions.Scope = "EntireWorkbook"
61+
var trimContentOptions = new(TrimContentOptions)
62+
trimContentOptions.DataSource = trimContentOptionsDataSource
63+
trimContentOptions.TrimLeading = true
64+
trimContentOptions.TrimTrailing = true
65+
trimContentOptions.TrimSpaceBetweenWordTo1 = true
66+
trimContentOptions.RemoveAllLineBreaks = true
67+
trimContentOptions.ScopeOptions = trimContentOptionsScopeOptions
68+
69+
request := new(PostTrimContentRequest)
70+
request.TrimContentOptions = trimContentOptions
71+
_, httpResponse, err := GetBaseTest().CellsApi.PostTrimContent(request)
72+
if err != nil {
73+
t.Error(err)
74+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
75+
t.Fail()
76+
} else {
77+
fmt.Printf("%d\tTestTextProcessingController_PostTrimContent \n", GetBaseTest().GetTestNumber())
78+
}
79+
}

docs/api/post-trim-content.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# **postTrimContent API**
2+
3+
4+
5+
```bash
6+
7+
POST http://api.aspose.cloud/v3.0//cells/trimcontent
8+
9+
```
10+
11+
## The request parameters of **postTrimContent** API are:
12+
13+
| Parameter Name | Type | Path/Query String/HTTPBody | Description |
14+
| :- | :- | :- |:- |
15+
|trimContentOptions|Class|Body||
16+
17+
18+
The [OpenAPI Specification](https://reference.aspose.cloud/cells/#/TextProcessingController/PostTrimContent) defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.

docs/model/scope-item.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# **scopeItem**
2+
3+
4+
5+
## **Properties**
6+
7+
| Property Name | Property Type | Nullable | ReadOnly | DefaultValue | Description |
8+
| :- | :- | :- |:- | :- | :- |
9+
|WorksheetName|String|true|false | ||
10+
|Ranges|Array|true|false | ||
11+

docs/model/search-scope-options-type.md renamed to docs/model/scope-options-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# **searchScopeOptionsType**
1+
# **scopeOptionsType**
22

33

44

0 commit comments

Comments
 (0)