Skip to content

Commit 04fc07f

Browse files
committed
ISSUE-CELLSCLOUD-13528: Add workbook and big file example codes.
1 parent 0703729 commit 04fc07f

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

.github/workflows/sdkbuild2run.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ jobs:
4343
python .\Example_Management.py
4444
python .\Example_DataCleaning.py
4545
python .\Example_ExcelSplit.py
46+
python .\Example_Workbook.py

examples/BigBook.xlsx

41.8 MB
Binary file not shown.

examples/Example_BigBook.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import json
2+
import os
3+
4+
from asposecellscloud.apis.cells_api import CellsApi
5+
from asposecellscloud.models import *
6+
from asposecellscloud.requests import *
7+
8+
# Get Cells Cloud SDK instance
9+
# If no environment variables are configured, please obtain the ClientId and ClientSecret from https://dashboard.aspose.cloud/#/applications and replace the following values:
10+
# instance = CellsApi('YourClientId','YourClientSecret')
11+
instance = CellsApi(os.getenv('CellsCloudClientId'),os.getenv('CellsCloudClientSecret'))
12+
13+
# Upload a local Excel file to Cells Cloud Storage.
14+
instance.upload_file( UploadFileRequest("BigBook.Xlsx", "PythonSDK/BigBook.xlsx"))
15+
# Get workbook settings of
16+
response = instance.get_workbook_settings(GetWorkbookSettingsRequest("BigBook.xlsx",folder = "PythonSDK"))
17+
print(response.settings.build_version)
18+
print(response.settings.author)
19+
20+

examples/Example_Workbook.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import json
2+
import os
3+
4+
from asposecellscloud.apis.cells_api import CellsApi
5+
from asposecellscloud.models import *
6+
from asposecellscloud.requests import *
7+
8+
# Get Cells Cloud SDK instance
9+
# If no environment variables are configured, please obtain the ClientId and ClientSecret from https://dashboard.aspose.cloud/#/applications and replace the following values:
10+
# instance = CellsApi('YourClientId','YourClientSecret')
11+
instance = CellsApi(os.getenv('CellsCloudClientId'),os.getenv('CellsCloudClientSecret'))
12+
13+
# Upload a local Excel file to Cells Cloud Storage.
14+
instance.upload_file( UploadFileRequest("EmployeeSalesSummary.Xlsx", "PythonSDK/EmployeeSalesSummary.xlsx"))
15+
# Get workbook settings of
16+
response = instance.get_workbook_settings(GetWorkbookSettingsRequest("EmployeeSalesSummary.xlsx",folder = "PythonSDK"))
17+
print(response.settings.build_version)
18+
print(response.settings.author)
19+
print(response.settings)

0 commit comments

Comments
 (0)