Skip to content

Instantly share code, notes, and snippets.

@blog-aspose-cloud
Last active October 30, 2023 00:36
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/dc1cf4f9cb6d13ea19db0ed857fa5393 to your computer and use it in GitHub Desktop.
Save blog-aspose-cloud/dc1cf4f9cb6d13ea19db0ed857fa5393 to your computer and use it in GitHub Desktop.
Learn how to convert MPP file to Excel using Aspose.Tasks Cloud SDK for Python

Convert Microsoft Project to Excel in Python


The Gist shares details on how to convert Microsoft Project to Excel using Aspose.Tasks Cloud SDK for Python.

In following code snippet, we are going to first upload the microsoft project file to cloud storage and then call the GetTaskDocumentWithFormat method to convert MPP File to XLSX format. For complete details, please visit Convert Microsoft Project to Excel in Python.

Microsoft Project to Excel in Python

Important Links

Home | Product Page | Docs | API Reference | Cloud Dashboard | Code Samples | Source Code | Blog | Free Support | Free Trial

Learn how to convert MPP file to Excel using Aspose.Tasks Cloud SDK for Python
# For complete examples and data files, please go to https://github.com/aspose-tasks-cloud/aspose-tasks-cloud-python
# Get client credentials from https://dashboard.aspose.cloud/
def MPPtoExcel():
try:
# create an instance of ApiClient
api_client = asposetaskscloud.ApiClient()
api_client.configuration.host = 'https://api.aspose.cloud'
# provide your client credential details
api_client.configuration.api_key['api_key'] = '1c9379bb7d701c26cc87e741a29987bb'
api_client.configuration.api_key['app_sid'] = 'bbf94a2c-6d7e-4020-b4d2-b9809741374e'
tasks_api = asposetaskscloud.TasksApi(api_client)
input_file_name = 'NewProductDev.mpp'
upload_request = asposetaskscloud.UploadFileRequest(path="NewProductDev.mpp",file= 'C:\\Users\\shahbnay\\Downloads\\'+input_file_name)
tasks_api.upload_file(upload_request)
request = asposetaskscloud.GetTaskDocumentWithFormatRequest(input_file_name, format="XLSX", return_as_zip_archive=False)
result = tasks_api.get_task_document_with_format(request)
# print message in console (optional)
print('Conversion successfull !')
except ApiException as e:
print("Exception while calling WordsApi: {0}".format(e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment