import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet7"
sourceSheet = "Sheet1"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to copy a worksheet
    response = cellsApi.PostCopyWorksheet(name=filename,
                                          sheetName=sheetName,
                                          sourceSheet=sourceSheet)
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet6"
pictureNumber = 0

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to get a specific picture from a worksheet
    response = cellsApi.GetWorksheetPicture(name=filename,
                                            sheetName=sheetName,
                                            pictureNumber=pictureNumber)
Ejemplo n.º 3
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
row = 1
column = 1
freezedRows = 1
freezedColumns = 1

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to o unfreeze panes in a worksheet
    response = cellsApi.DeleteWorksheetFreezePanes(
Ejemplo n.º 4
0
from asposecellscloud.CellsApi import ApiException

import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client);

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
cellarea = "A10:B20"
value = "1234"
type = "int"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to set value for selected range in a worksheet
    response = cellsApi.PostSetCellRangeValue(name=filename, sheetName=sheetName, cellarea=cellarea, type=type, value=value)
Ejemplo n.º 5
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Protected_Test_Book.xls"

body = WorkbookProtectionRequest.WorkbookProtectionRequest()
body.Password = "******"
body.ProtectionType = "None"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to un-protect a workbook
    response = cellsApi.DeleteUnProtectDocument(name=filename, body=body)
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet6"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to delete all pictures from a worksheet
    response = cellsApi.DeleteWorkSheetPictures(name=filename,
                                                sheetName=sheetName)

    if response.Status == "OK":
        #download Workbook from storage server
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet5"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to delete all charts from a worksheet
    response = cellsApi.DeleteWorksheetClearCharts(name=filename,
                                                   sheetName=sheetName)

    if response.Status == "OK":
        #download updated Workbook from storage server
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Embeded_OleObject_Sample_Book1.xlsx"
sheetName = "Sheet1"
oleObjectIndex = 0

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to get a specific oleobject from a worksheet
    response = cellsApi.GetWorksheetOleObject(name=filename,
                                              sheetName=sheetName,
                                              objectNumber=oleObjectIndex)
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
name = "Sample_Test_Book"
filename = name + ".xls"
sheetName = "Sheet4"
autoshapeNumber = 1
format = "png"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to convert an autoshape to image
    response = cellsApi.GetWorksheetAutoshapeWithFormat(
        name=filename,
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
format = "png"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to merge multiple workbooks into a single workbook
    response = cellsApi.PostWorkbookSplit(name=filename,
                                          format=format,
                                          ffrom=2,
                                          to=2)
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"

body = CreatePivotTableRequest.CreatePivotTableRequest()
body.Name = "MyPivot"
body.SourceData = "A5:E10"
body.DestCellName = "H20"
body.UseSameSource = True
body.PivotFieldRows = [1]
body.PivotFieldColumns = [1]
body.PivotFieldData = [1]

#upload file to aspose cloud storage
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
name = "Sample_Test_Book"
filename = name + ".xls"
sheetName = "Sheet6"
pictureNumber = 0
format = "png"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to convert a picture to image
    response = cellsApi.GetWorksheetPictureWithFormat(
        name=filename,
Ejemplo n.º 13
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
cellArea = "A5:A10"

sort = SortKey.SortKey()
sort.Key = 0
sort.SortOrder = "descending"

body = DataSorter.DataSorter()
body.CaseSensitive = "false"
body.HasHeaders = "false"
body.SortLeftToRight = "false"
body.KeyList = [sort]
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
upperLeftRow = 5
upperLeftColumn = 5
lowerRightRow = 10
lowerRightColumn = 10
picturePath = "aspose-cloud.png"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)
storageApi.PutCreate(Path=picturePath, file=data_folder + picturePath)

try:
Ejemplo n.º 15
0
from asposecellscloud.models import Legend

import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client);

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet5"
chartIndex = 0

body = Legend.Legend()
body.Height = 15
body.Position = "Left"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to update a chart legend of a chart
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
columnIndex = 1

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to get a specific column from a worksheet
    response = cellsApi.GetWorksheetColumn(name=filename,
                                           sheetName=sheetName,
                                           columnIndex=columnIndex)
Ejemplo n.º 17
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
rowIndex = 1

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to get a specific row from a worksheet
    response = cellsApi.GetWorksheetRow(name=filename,
                                        sheetName=sheetName,
                                        rowIndex=rowIndex)
from asposecellscloud.CellsApi import ApiException

import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client);

#set input file name
filename = "Embeded_OleObject_Sample_Book1.xlsx"
sheetName = "Sheet1"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to delete all OleObjects from a worksheet
    response = cellsApi.DeleteWorksheetOleObjects(name=filename, sheetName=sheetName)

    if response.Status == "OK":
        #download Workbook from storage server
        response = storageApi.GetDownload(Path=filename)
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
validationIndex = 0

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to get validation from a worksheet
    response = cellsApi.GetWorkSheetValidation(name=filename,
                                               sheetName=sheetName,
                                               validationIndex=validationIndex)
Ejemplo n.º 20
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"

body = WorksheetMovingRequest.WorksheetMovingRequest()
body.DestinationWorksheet = "Sheet5"
body.Position = "after"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to  a new location in a workbook
    response = cellsApi.PostMoveWorksheet(name=filename,
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet2"
hyperlinkIndex = 0

body = Hyperlink.Hyperlink()
body.Address = "http://www.aspose.com/cloud/total-api.aspx"
body.TextToDisplay = "Aspose Cloud APIs"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to add a hyperlink to a worksheet
Ejemplo n.º 22
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
name = "Sample_Test_Book"
filename = name + ".xls"
sheetName = "Sheet5"
chartNumber = 0
format = "png"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to convert a chart to image
    response = cellsApi.GetWorksheetChartWithFormat(name=filename,
                                                    sheetName=sheetName,
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Book1.xlsx"
propertyName = "AsposeAuthor"

body = CellsDocumentProperty.CellsDocumentProperty()
body.Name = "AsposeAuthor"
body.Value = "Aspose Plugin Developer"
body.BuiltIn = False

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to set a particular document property
Ejemplo n.º 24
0
from asposecellscloud.CellsApi import ApiException

import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client);

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
cellName = "a12"
type = "int"
formula = "sum(a5:a10)"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to set formula for a cell in a worksheet
    response = cellsApi.PostWorksheetCellSetValue(name=filename, sheetName=sheetName, cellName=cellName, type=type, formula=formula)
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet5"
chartIndex = 0

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to delete chart title of a chart
    response = cellsApi.DeleteWorksheetChartTitle(name=filename,
                                                  sheetName=sheetName,
                                                  chartIndex=chartIndex)
Ejemplo n.º 26
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Pivot_Table_Example.xls"
sheetName = "Sheet2"
pivotTableIndex = 0

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to delete worksheet pivot table by index
    response = cellsApi.DeleteWorksheetPivotTable(
        name=filename, sheetName=sheetName, pivotTableIndex=pivotTableIndex)

    if response.Status == "OK":
from asposecellscloud.models import OleObject

import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client);

#set input file name
filename = "Embeded_OleObject_Sample_Book1.xlsx"
sheetName = "Sheet1"
oleObjectIndex = 0

sourceFileName = "Sample_Book2.xls"
imageFileName = "aspose-logo.png"

body  = OleObject.OleObject()
body.SourceFullName = sourceFileName
body.ImageSourceFullName = imageFileName
body.UpperLeftRow = 15
body.UpperLeftColumn = 5
body.Top = 10
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Book1.xlsx"
propertyName = "AsposeAuthor"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to remove a particular document property
    response = cellsApi.DeleteDocumentProperty(name=filename,
                                               propertyName=propertyName)

    if response.Status == "OK":
        #download Workbook from storage server
Ejemplo n.º 29
0
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet1"
firstRow = 2
firstColumn = 2
totalRows = 2
totalColumns = 2
address = "http://www.aspose.com/cloud/total-api.aspx"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to add a hyperlink to a worksheet
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi

apiKey = "XXXXX"  #sepcify App Key
appSid = "XXXXX"  #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(
    apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Cells API SDK
api_client = asposecellscloud.ApiClient.ApiClient(apiKey, appSid, True)
cellsApi = CellsApi(api_client)

#set input file name
filename = "Sample_Test_Book.xls"
sheetName = "Sheet2"
cellOrMethodName = "a1"

#upload file to aspose cloud storage
storageApi.PutCreate(Path=filename, file=data_folder + filename)

try:
    #invoke Aspose.Cells Cloud SDK API to get a specific cell from a worksheet
    response = cellsApi.GetWorksheetCell(name=filename,
                                         sheetName=sheetName,
                                         cellOrMethodName=cellOrMethodName)
    if response.Status == "OK":