Skip to content

Commit fd0d342

Browse files
committed
Add convert text feature on TextProcessingController.
1 parent 0172a1a commit fd0d342

8 files changed

+282
-40
lines changed

README.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-go)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-go/blob/master/LICENSE)
1+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-go)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-go/blob/master/LICENSE)
22

33
Aspose.Cells Cloud for Go enables you to handle various aspects of Excel files, including cell data, styles, formulas, charts, pivot tables, data validation, comments, drawing objects, images, hyperlinks, and so on. Additionally, it supports operations such as splitting, merging, repairing, and converting to other compatible file formats.
44

@@ -19,13 +19,13 @@ Enhance your Go applications with the [Aspose.Cells Cloud](https://products.aspo
1919
- Import/Export: Facilitates importing data from various sources into spreadsheets and exporting spreadsheet data to other formats.
2020
- Security Management: Offers a range of security features like data encryption, access control, and permission management to safeguard the security and integrity of spreadsheet data.
2121

22-
## There are major problems with v24.5.0 and it does not work properly, please use v24.5.1.
22+
## There are major problems with v24.5.0 and it does not work properly, please use v24.5.1
2323

24-
## Feature & Enhancements in Version 24.10
24+
## Feature & Enhancements in Version 24.11
2525

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

28-
- Add the new feature about removing characters on TextProcessingController.
28+
- Add convert text feature on TextProcessingController.
2929

3030
## Support file format
3131

@@ -65,7 +65,6 @@ Full list of issues covering all changes in this release:
6565
|[DOCX](https://docs.fileformat.com/word-processing/docx/)|A well-known format for Microsoft Word documents that is a combination of XML and binary files.||√|
6666
|[PPTX](https://docs.fileformat.com/presentation/pptx/)|The PPTX format is based on the Microsoft PowerPoint open XML presentation file format.||√|
6767

68-
6968
## Quick Start Guide
7069

7170
To get started with Aspose.Cells Cloud for Go, follow these steps:
@@ -74,39 +73,37 @@ To get started with Aspose.Cells Cloud for Go, follow these steps:
7473
2. Download the code and add or modify your application by referring to cells_cloud_test.go.
7574
3. If you prefer to use [Go Module](https://pkg.go.dev), import "github.com/aspose-cells-cloud/aspose-cells-cloud-go/v24" in your code.
7675

77-
7876
```golang
79-
remoteFolder := "TestData/In"
80-
localFolder := "testdata/"
81-
localName := "Book1.xlsx"
82-
remoteName := "Book1.xlsx"
83-
instance := asposecellscloud.NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"), "https://api.aspose.cloud", "v3.0")
84-
85-
localNameRequest := new(asposecellscloud.UploadFileRequest)
86-
localNameRequest.UploadFiles = make(map[string]string)
87-
localNameRequest.UploadFiles[localName] = localFolder + localName
88-
localNameRequest.Path = remoteFolder + "/" + remoteName
89-
localNameRequest.StorageName = ""
90-
instance.UploadFile(localNameRequest)
91-
92-
newfilename := "TestData/OutResult/PostExcelSaveAs.pdf"
93-
94-
var saveOptions = new(asposecellscloud.PdfSaveOptions)
95-
saveOptions.SaveFormat = "pdf"
96-
97-
request := new(asposecellscloud.PostWorkbookSaveAsRequest)
98-
request.Name = remoteName
99-
request.Newfilename = newfilename
100-
request.SaveOptions = saveOptions
101-
request.Folder = remoteFolder
102-
_, httpResponse, err := instance.PostWorkbookSaveAs(request)
103-
if err != nil {
104-
println(err)
105-
}
106-
println(httpResponse.StatusCode)
77+
remoteFolder := "TestData/In"
78+
localFolder := "testdata/"
79+
localName := "Book1.xlsx"
80+
remoteName := "Book1.xlsx"
81+
instance := asposecellscloud.NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"), "https://api.aspose.cloud", "v3.0")
82+
83+
localNameRequest := new(asposecellscloud.UploadFileRequest)
84+
localNameRequest.UploadFiles = make(map[string]string)
85+
localNameRequest.UploadFiles[localName] = localFolder + localName
86+
localNameRequest.Path = remoteFolder + "/" + remoteName
87+
localNameRequest.StorageName = ""
88+
instance.UploadFile(localNameRequest)
89+
90+
newfilename := "TestData/OutResult/PostExcelSaveAs.pdf"
91+
92+
var saveOptions = new(asposecellscloud.PdfSaveOptions)
93+
saveOptions.SaveFormat = "pdf"
94+
95+
request := new(asposecellscloud.PostWorkbookSaveAsRequest)
96+
request.Name = remoteName
97+
request.Newfilename = newfilename
98+
request.SaveOptions = saveOptions
99+
request.Folder = remoteFolder
100+
_, httpResponse, err := instance.PostWorkbookSaveAs(request)
101+
if err != nil {
102+
println(err)
103+
}
104+
println(httpResponse.StatusCode)
107105
```
108106

109-
110107
## Aspose.Cells Cloud in Popular Languages
111108

112109
| .NET | Java | PHP | Python | Ruby | Node.js | Android | Swift | Perl |
@@ -118,18 +115,22 @@ To get started with Aspose.Cells Cloud for Go, follow these steps:
118115

119116
# Release history version
120117

118+
## Feature & Enhancements in Version 24.10
119+
120+
- Add the new feature about removing characters on TextProcessingController.
121+
121122
## Feature & Enhancements in Version 24.9
122123

123124
- Add word case function for TextProcessingController.
124125
- Support to export Worksheet to HTML with cell address or id.
125126

126127
## Feature & Enhancements in Version 24.8
127128

128-
- Add text trim feature on Cells Cloud Services.
129+
- Add text trim feature on Cells Cloud Services.
129130

130131
## Feature & Enhancements in Version 24.7
131132

132-
- Add Text Trim feature on Cells Cloud Services.
133+
- Add Text Trim feature on Cells Cloud Services.
133134
- Add get access token by client id and client secret.
134135

135136
## Feature & Enhancements in Version 24.6
@@ -152,7 +153,7 @@ To get started with Aspose.Cells Cloud for Go, follow these steps:
152153
- Support data filling.
153154
- Support to delete incomplete rows.
154155
- Support data cleansing.
155-
156+
156157
## Enhancements in Version 24.2.1
157158

158159
- Support data deduplication.

api/swagger.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
swagger: "2.0"
33
info:
4-
version: "24.10"
4+
version: "24.11"
55
title: "Aspose.Cells Cloud APIs."
66
host: "api.aspose.cloud"
77
basePath: "/v3.0"
@@ -12053,6 +12053,20 @@ paths:
1205312053
type: "class:removecharactersoptions"
1205412054
x-nullable: true
1205512055
x-exportParamName: "removeCharactersOptions"
12056+
/cells/converttext:
12057+
post:
12058+
tags:
12059+
- "Cells"
12060+
summary: ""
12061+
operationId: "PostConvertText"
12062+
parameters:
12063+
- name: "converttextoptions"
12064+
in: "Body"
12065+
description: ""
12066+
required: true
12067+
type: "class:converttextoptions"
12068+
x-nullable: true
12069+
x-exportParamName: "convertTextOptions"
1205612070
/cells/{name}/defaultstyle:
1205712071
get:
1205812072
tags:
@@ -22231,6 +22245,41 @@ definitions:
2223122245

2223222246
properties:
2223322247

22248+
ConvertTextOptions:
22249+
allOf:
22250+
- type: "object"
22251+
22252+
properties:
22253+
Name:
22254+
type: "string"
22255+
description: ""
22256+
DataSource:
22257+
type: "class:datasource"
22258+
description: ""
22259+
FileInfo:
22260+
type: "class:fileinfo"
22261+
description: ""
22262+
Worksheet:
22263+
type: "string"
22264+
description: ""
22265+
Range:
22266+
type: "string"
22267+
description: ""
22268+
ConvertTextType:
22269+
type: "string"
22270+
description: ""
22271+
SourceCharacters:
22272+
type: "string"
22273+
description: ""
22274+
TargetCharacters:
22275+
type: "string"
22276+
description: ""
22277+
ConvertTextType:
22278+
allOf:
22279+
- type: "object"
22280+
22281+
properties:
22282+
2223422283
RemoveCharactersByCharacter:
2223522284
type: "object"
2223622285
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.10---")
36+
fmt.Println("---Version: 24.11---")
3737
}
3838

3939
func NewCellsApiService(appSid string, appKey string, opts ...string) *CellsApiService {
@@ -7299,6 +7299,34 @@ func (a *CellsApiService) PostRemoveCharacters(data *PostRemoveCharactersRequest
72997299
}
73007300

73017301

7302+
func (a *CellsApiService) PostConvertText(data *PostConvertTextRequest) ( FileInfo, *http.Response, error) {
7303+
var (
7304+
localVarReturnValue FileInfo
7305+
7306+
)
7307+
7308+
r, err := data.CreateRequestData(a.client);
7309+
if err != nil {
7310+
return localVarReturnValue, nil, err
7311+
}
7312+
7313+
localVarHttpResponse, err := a.client.callAPI(r)
7314+
if err != nil || localVarHttpResponse == nil {
7315+
return localVarReturnValue, localVarHttpResponse, err
7316+
}
7317+
defer localVarHttpResponse.Body.Close()
7318+
if localVarHttpResponse.StatusCode >= 300 {
7319+
bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body)
7320+
return localVarReturnValue, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes)
7321+
}
7322+
if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&localVarReturnValue); err != nil {
7323+
return localVarReturnValue, localVarHttpResponse, err
7324+
}
7325+
7326+
return localVarReturnValue, localVarHttpResponse, err
7327+
}
7328+
7329+
73027330
func (a *CellsApiService) GetWorkbookDefaultStyle(data *GetWorkbookDefaultStyleRequest) ( StyleResponse, *http.Response, error) {
73037331
var (
73047332
localVarReturnValue StyleResponse

docs/api/post-convert-text.md

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

docs/model/convert-text-options.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# **convertTextOptions**
2+
3+
4+
5+
## **Properties**
6+
7+
| Property Name | Property Type | Nullable | ReadOnly | DefaultValue | Description |
8+
| :- | :- | :- |:- | :- | :- |
9+
|Name|String|true|false | ||
10+
|DataSource|Class|true|false | ||
11+
|FileInfo|Class|true|false | ||
12+
|Worksheet|String|true|false | ||
13+
|Range|String|true|false | ||
14+
|ConvertTextType|String|true|false | ||
15+
|SourceCharacters|String|true|false | ||
16+
|TargetCharacters|String|true|false | ||
17+

docs/model/convert-text-type.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# **convertTextType**
2+
3+
4+
5+
## **Properties**
6+
7+
| Property Name | Property Type | Nullable | ReadOnly | DefaultValue | Description |
8+
| :- | :- | :- |:- | :- | :- |
9+

model_convert_text_options.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/** --------------------------------------------------------------------------------------------------------------------
2+
* <copyright company="Aspose" file="ConvertTextOptions.go">
3+
* Copyright (c) 2024 Aspose.Cells Cloud
4+
* </copyright>
5+
* <summary>
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
* </summary>
24+
-------------------------------------------------------------------------------------------------------------------- **/
25+
26+
package asposecellscloud
27+
28+
type ConvertTextOptions struct {
29+
30+
Name string `json:"Name,omitempty" xml:"Name"`
31+
32+
DataSource *DataSource `json:"DataSource,omitempty" xml:"DataSource"`
33+
FileInfo *FileInfo `json:"FileInfo,omitempty" xml:"FileInfo"`
34+
Worksheet string `json:"Worksheet,omitempty" xml:"Worksheet"`
35+
Range_ string `json:"Range,omitempty" xml:"Range"`
36+
ConvertTextType string `json:"ConvertTextType,omitempty" xml:"ConvertTextType"`
37+
SourceCharacters string `json:"SourceCharacters,omitempty" xml:"SourceCharacters"`
38+
TargetCharacters string `json:"TargetCharacters,omitempty" xml:"TargetCharacters"`
39+
}

0 commit comments

Comments
 (0)