Skip to content

Instantly share code, notes, and snippets.

@blog-aspose-cloud
Last active May 19, 2022 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blog-aspose-cloud/c7a93de260a10c74d500a90f7c56111d to your computer and use it in GitHub Desktop.
Save blog-aspose-cloud/c7a93de260a10c74d500a90f7c56111d to your computer and use it in GitHub Desktop.
XLSB to PDF Conversion in Python
Learn how to convert MPP file to Excel using Aspose.Cells Cloud SDK for Python
# For more code samples, please visit https://github.com/aspose-cells-cloud/aspose-cells-cloud-python
def XLSBtoPDF():
try:
#Client credentials
client_secret = "1c9379bb7d701c26cc87e741a29987bb"
client_id = "bbf94a2c-6d7e-4020-b4d2-b9809741374e"
# initialize CellsApi instance
cellsApi = asposecellscloud.CellsApi(client_id,client_secret)
# input XLSB workbook
input_file = "myDocument.xlsb"
# resultant format
format = "PDF"
# resultant file name
output = "Converted.pdf"
# call the API to convert XLSB to PDF
response = cellsApi.cells_workbook_get_workbook(name = input_file, format=format, out_path=output)
# print response code in console
print(response)
# print message in console (optional)
print('XLSB sucessfully converted to PDF !')
except ApiException as e:
print("Exception while calling CellsApi: {0}".format(e))
print("Code:" + str(e.code))
print("Message:" + e.message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment