Skip to content

Commit 97bfd8d

Browse files
committed
Update Readme.
1 parent f56c460 commit 97bfd8d

File tree

2 files changed

+9
-53
lines changed

2 files changed

+9
-53
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ import (
2323

2424
func main() {
2525
instance := NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"))
26-
request := PutConvertWorkbookRequest{File: map[string]string{"Book1.xlsx": "TestData/Book1.xlsx"}, Format: "pdf"}
27-
data, _, err := instance.PutConvertWorkbook(&request)
28-
if err == nil {
29-
file, _ := os.OpenFile("Book1.pdf", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
30-
file.Write(data)
31-
defer file.Close()
26+
_, httpResponse, err := instance.ConvertSpreadsheet(&ConvertSpreadsheetRequest{Spreadsheet: "EmployeeSalesSummary.xlsx", Format: "pdf"}, []CellsCloudOption{{OptionName: "LocalOutPath", OptionValue: "EmployeeSalesSummary.pdf"}}...)
27+
if err != nil {
28+
fmt.Print(err)
29+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
30+
fmt.Print("E")
31+
} else {
32+
fmt.Print("T")
3233
}
34+
Version()
3335
}
36+
3437
```
3538

3639
- Initialize project go.mod , fetch the dependencies for your project, and run your created application..

model_spreadsheet_m_l2003_save_options.go

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

0 commit comments

Comments
 (0)