
Explore Python's numeric data types—integers, floats, booleans, and complex numbers—within the six core data types (number, string, list, tuple, dictionary, set), with hands-on examples and type demonstrations.
Learn to create and manipulate Python lists, including nested lists, indexing, slicing, and operations like append, insert, remove, and merge. Explore length, min, max, and sublists in two-dimensional lists.
Explore Python tuples, their immutability compared with lists, and how to define them with parentheses or the tuple keyword, including indexing, slicing, and inner-list mutability.
Explore Python sets and None type, learn to create sets with set(), distinguish them from dictionaries, and perform intersection, union, and difference while removing duplicates by converting lists to sets.
Explore Python's three basic programming structures, focusing on the selection structure with if, elif, else, and the ternary operator; learn value validation, list membership checks, and simple list comprehension.
Master the basics of Python functions by defining with def, passing parameters and arguments, and returning values; learn parameter versus argument, default values, and *args and **kwargs with examples.
Demonstrate private property and private method in a Python class, explain public, protected, and private access with double underscore, and show using getters and setters to interact with private data.
Explore Python magic methods and the object life cycle. Learn __new__, __init__, __del__, and iterable behavior with __iter__ and __next__.
Explore inheritance and polymorphism in Python by defining a person parent class and student and teacher children, showing method overriding and polymorphic calls.
Explore Python modules and packages, and structure reusable code with modules and packages. Use pip to install and manage dependencies, and learn import styles and the __name__ guard.
Explore core Python modules for office tasks, including date time, decimal, and OS, with hands-on demos of timestamps, date formatting, decimal precision, and file system operations.
Explore using openpyxl to create, open, and save Excel workbooks in Python, work with worksheets and cells, manage file paths, and automate common Excel tasks.
Get default worksheet
Worksheet properties
Learn to access Excel cells with Python using worksheet, rows, and columns; iterate to retrieve values, compute average and maximum and minimum temperatures, and save results to a new file.
Master configuring border style and fill with gradient and pattern fills in openpyxl for Excel, including border sides, colors, and font and alignment context.
Explore how to set paragraph alignment and apply built-in Word styles using Python and the docx library, including left, center, right, justified, and distributed alignments and built-in style types.
Explore space, indent, and removing paragraph styles in Word using Python, demonstrating how to set space before and after, line spacing, and delete paragraph styles to reset to normal.
Learn how to set a Word title with Python by applying the title style and level, and understand the title and paragraph relationship.
Discover how to insert and modify Word tables with Python, creating a table object, adding rows and columns, and manipulating table properties via python-docx in a document.
Explore creating and styling Word tables with Python, applying cell and paragraph styles, color, and font size, and selecting table styles like grid and colorful grid for polished documents.
Learn to manage Word document page settings with Python by configuring header and footer, first page options, odd/even pages, and section-specific layouts.
Learn to work with shapes in PowerPoint from Python: retrieve, add, and modify shapes such as auto shapes, pictures, frames, groups, lines, and content placeholders, including fill color and borders.
Explore placeholders in PowerPoint slides using Python, learn to identify placeholder types, retrieve their names and indices, and fill placeholders with text or images to build dynamic slides.
Learn to create and customize a PowerPoint column chart with Python, including preparing chart data, adding categories and series, configuring axes, legend position, fonts, and basic styling.
learn to create and customize line and scatter charts in PowerPoint using Python PPT, including preparing data, adding series, configuring legends, and noting data table support limitations.
Create a test PowerPoint file with both chart and table placeholders by customizing the slide master, then insert a pie chart and verify the placeholder types with Python for PowerPoint.
Apply Python to PowerPoint to work with tables, enabling creation, modification, and formatting of table data within slides.
Automate PowerPoint tasks with Python to create, format, and manipulate tables, enhancing productivity in office workflows across slides.
Automate PowerPoint table tasks with Python to create, update, and format tables inside slides, enabling efficient office automation across presentations.
Apply Python and PyPDF2 to open and save PDFs, create and modify pages, handle encryption and decryption, and convert PDFs to Word or PowerPoint, noting conversion limits.
Learn to work with PDF pages in Python: read and write pages using a PDF reader, writer, and merger, handle deprecated methods, and merge multiple documents.
Learn to add a watermark to pdf pages with python by creating a watermark page and merging it with each target page, using pdf reader and writer tools.
Learn to read and update PDF metadata with Python using PyPDF2, accessing author, title, producer, and other document info, and modify metadata for PDF files.
Install and use the pdf tool docx to convert PDFs to Word, handling multi-page documents and optional password protection, and validate results.
Explore using Python to merge two PDF files side by side, control layout with horizontal merging, and review basic PDF metadata and options for saving or printing.
This is the self learning the book (in Chinese) 《让Python遇上Office - 从编程入门到自动化办公实践》"When Python Meets Office - From Entry Programming to Office Automation Practice", teach in English language, let you familiar the related Python library dealing with Excel (openpyxl), Word (python-docx), PowerPoint (python-pptx) and PDF (pypdf2 or pypdf3), demo and guide you not only the usage of those libraries, but also practice the actual exercise in those variable office components.
You can buy this book either from online store or read directly from WeChat Read app.
After the course, you'll be confidently choose the right "tool" in proper scenario, and improve your office automation productivity.
The book has 10 chapters in total, divided into 3 parts: The first part (Chapter 1~5) includes the basic knowledge of getting started with Python from scratch (data types, functions, classes and objects, catching exceptions, file operations, management modules, etc.); Chapter 1 The second part (Chapter 6~9) focuses on operating office documents and introduces how to use Python code to process Word, Excel, PPT, and PDF documents to realize document office automation; the third part (Chapter 10) is the advanced part. It involves desktop automation, sending emails, network requests, scheduled tasks, GUI, packaging programs, etc., which can help readers further improve work efficiency.
The course is focusing on show you how to learn by doing! I do hope you can learn new skills as well as feel fun during the journey! Good luck!