Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert Excel Spreadsheet to PDF in Python
# Convert Excel Spreadsheets XLS, XLSX to PDF in Python
# Set your APP KEY and APP SID obtained from
apiInstance = groupdocs_conversion_cloud.ConvertApi.from_keys(Common.app_sid, Common.app_key)
# Prepare convert settings
settings = groupdocs_conversion_cloud.ConvertSettings()
settings.file_path = "Resources/spreadsheet.xlsx"
settings.format = "pdf"
# Load Options and Output settings
loadOptions = groupdocs_conversion_cloud.SpreadsheetLoadOptions()
loadOptions.one_page_per_sheet = True
settings.load_options = loadOptions
settings.output_path = "converted"
# Convert the Spreadsheet to PDF
result = apiInstance.convert_document(groupdocs_conversion_cloud.ConvertDocumentRequest(settings))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment