Skip to content

Commit fd1ce66

Browse files
committed
Add code examples about converting chart to image.
1 parent d665dbd commit fd1ce66

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
import shutil
3+
import base64
4+
from asposecellscloud.apis.cells_api import CellsApi
5+
from asposecellscloud.models import *
6+
from asposecellscloud.requests import *
7+
8+
9+
EmployeeSalesSummaryXlsx = "EmployeeSalesSummary.xlsx"
10+
RemoteFolder = "PythonSDK"
11+
# Get Cells Cloud SDK instance
12+
instance = CellsApi(os.getenv('CellsCloudClientId'),os.getenv('CellsCloudClientSecret'))
13+
14+
# Upload a local Excel file to Cells Cloud Storage.
15+
instance.upload_file( UploadFileRequest(EmployeeSalesSummaryXlsx, "PythonSDK/EmployeeSalesSummary.xlsx"))
16+
17+
request = GetWorksheetChartRequest( EmployeeSalesSummaryXlsx, 'Sales', 0,format= 'png',folder= 'PythonSDK',storage_name= '')
18+
tmp_path = instance.get_worksheet_chart(request)
19+
shutil.move( tmp_path ,"EmployeeSalesSummary_Sales.png")

0 commit comments

Comments
 (0)