Skip to content

Commit cc3a8f6

Browse files
committed
Update Quick Start Guide for Readme.
1 parent ecc0091 commit cc3a8f6

File tree

8 files changed

+27
-96
lines changed

8 files changed

+27
-96
lines changed

.github/workflows/sdktest.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/cells.cloud-sdk-go.iml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.swagger-codegen/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 27 additions & 31 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

@@ -71,39 +71,35 @@ Full list of issues covering all changes in this release:
7171

7272
To get started with Aspose.Cells Cloud for Go, follow these steps:
7373

74-
1. Create an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/apps) and obtain your application information.
75-
2. Download the code and add or modify your application by referring to cells_cloud_test.go.
76-
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.
74+
- Create an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/apps) and obtain your application client id and secret.
75+
- Create a directory for your project and a main.go file within. Add the following code to your main.go.
7776

7877
```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)
78+
package main
79+
80+
import (
81+
"os"
82+
. "github.com/aspose-cells-cloud/aspose-cells-cloud-go/v25"
83+
)
84+
85+
func main() {
86+
instance := NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"))
87+
request := PutConvertWorkbookRequest{File: map[string]string{"Book1.xlsx": "TestData/Book1.xlsx"}, Format: "pdf"}
88+
data, _, err := instance.PutConvertWorkbook(&request)
89+
if err == nil {
90+
file, _ := os.OpenFile("Book1.pdf", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
91+
file.Write(data)
92+
defer file.Close()
10593
}
106-
println(httpResponse.StatusCode)
94+
}
95+
```
96+
97+
- Initialize project go.mod , fetch the dependencies for your project, and run your created application..
98+
99+
```bash
100+
go mod init main
101+
go mod tidy
102+
go run main.go
107103
```
108104

109105
## Aspose.Cells Cloud SDKs in Popular Languages

0 commit comments

Comments
 (0)