Convert Excel to PDF Using Python Last Updated : 11 Jun, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report Python is a high-level, general-purpose, and very popular programming language. Python programming language (latest Python 3) is being used in web development, Machine Learning applications, along with all cutting-edge technology in Software Industry.In this article, we will learn how to convert an Excel File to PDF File Using PythonHere we will use the win32com module for file conversion.What is win32com?Python extensions for Microsoft Windows Provide access to much of the Win32 API, the ability to create and use COM objects, and the Pythonwin environment.pip install pywin32Approach:First, we will create a COM Object Using Dispatch() method.Then we will read the Excel file pass "Excel.Application" inside the Dispatch methodPass Excel file pathThen we will convert it into PDF using the ExportAsFixedFormat() methodExportAsFixedFormat():- The ExportAsFixedFormat method is used to publish a workbook in either PDF or XPS format.Syntax:ExportAsFixedFormat (Type, FileName, Quality, IncludeDocProperties, IgnorePrintAreas, From, To, OpenAfterPublish, FixedFormatExtClassPtr)Excel File click hereInput:EXCEL FILEBelow is the Implementation: Python # Import Module from win32com import client # Open Microsoft Excel excel = client.Dispatch("Excel.Application") # Read Excel File sheets = excel.Workbooks.Open('Excel File Path') work_sheets = sheets.Worksheets[0] # Convert into PDF File work_sheets.ExportAsFixedFormat(0, 'PDF File Path') # Close the workbook and quit Excel sheets.Close() excel.Quit() Output:PDF FILE Comment More infoAdvertise with us Next Article Convert Python File to PDF A abhigoya Follow Improve Article Tags : Python python-utility Practice Tags : python Similar Reads Convert PDF to CSV using Python Python is a high-level, general-purpose, and very popular programming language. Python programming language (the latest Python 3) is being used in web development, Machine Learning applications, along with all cutting-edge technology in Software Industry. Python Programming Language is very well sui 2 min read Convert PDF to Image using Python Many tools are available on the internet for converting a PDF to an image. In this article, we are going to write code for converting pdf to image and make a handy application in python. Before writing the code we need to install the required module pdf2image and poppler.Modules Neededpdf2image 1.14 2 min read Convert PNG to JPG using Python PNG and JPG formats are used for image illustrations. Both the formats are used to provide good compatibilities with certain types of images like PNG works better with line drawings and icon graphics whereas JPG works well with photographs. However, both are interconvertible with respect to each oth 3 min read How to convert PDF file to Excel file using Python? In this article, we will see how to convert a PDF to Excel or CSV File Using Python. It can be done with various methods, here are we are going to use some methods. Method 1: Using pdftables_api Here will use the pdftables_api Module for converting the PDF file into any other format. It's a simple 2 min read Convert Python File to PDF We are tasked with converting a Python file into a PDF document. This allows you to present or store your Python code in a more accessible format. By converting the code to a PDF, you can easily share or archive it, making it more convenient to view and print in a professional, well-organized manner 3 min read Python Convert Html to PDF Convert HTML/webpage to PDF There are many websites that do not allow to download the content in form of pdf, they either ask to buy their premium version or don't have such download service in form of pdf. Conversion in 3 Steps from Webpage/HTML to PDF Step1: Download library pdfkit $ pip install p 1 min read Like