What interesting or useful things can be done by using Python to automate the office?

foreword

img

Reading data to automate office work, I believe that many people have a strong demand, and they all hope to break free from tedious and repetitive labor and spend their energy on meaningful things.

Almost any job in a modern office will use Excel, Word, PPT, email, etc.

Today I will teach you how to use Python to automate Excel, word, PPT, email, etc. Including: introducing the operation kit, installation method and specific method of operation. For students who have a lot of repetitive work every day, this tool is definitely a benefit.

[----Help Python learning, all the following learning materials are free at the end of the article! ----】

Chapter 1: "From now on, make a table without working overtime" Excel automatic processing

The office family can actually use VBA to solve automation problems, but many people may not use it.

Python has many third-party libraries available for excel, such as xlwings, xlsxwriter, xlrd, xlwt, pandas,

xlsxwriter, win32com, xlutils, etc.

These libraries can easily add, delete, rewrite and modify the format of excel files. Of course, it is not recommended that you go to all of them.

Try it, the time cost is too great.

img

xlrd: used to read Excel files;

xlwt: used to write Excel files;

xlutils: Utilities for manipulating Excel files, such as copying, splitting, filtering, etc.

1.1 Basic operation of Excel

data input

img

import module

read data

img

update data

img

set style

img

1.2 Data Summary

img

1.3 Table splitting

img

1.4 Use of openpyxl

openpyxl is a Python library for reading/writing Excel xlsx/xlsm/xltx/xltm files. It was born because of the lack of libraries that can read/write Office Open XML Formats natively from Python. Official documentation:

http://yumos.gitee.io/openpyxl3.0

openpyxl install

Install openpyxl using pip. It is recommended to do this in a Python virtualenv without system packages:

pip install openpyxl

Support for the popular lxml library (if installed). This is especially useful when creating large files.

img

1.5 Merge one worksheet in multiple workbooks

img

1.6 Merge all worksheets in multiple workbooks

img

1.7 Quickly arrange the file name to excel

1.8 One-click row color change

img

1.9 Quickly generate salary slips

1.10 Quick statistics of overtime hours

1.11 Quickly find duplicate data

* Too much content, please digest this part first*

1. Learning routes in all directions of Python

Just started learning python, if you don't even plan the complete learning steps, it is basically impossible to learn python. He sorted out all the directions of Python to form a summary of knowledge points in various fields.(The wife in the picture is too big. I can’t put it here. If you don’t have a full version, you can get it for free at the end of the article)

Some hard skills needed to engage in data analysis, such as how to use python, SQL and other tools!

insert image description here

2. Getting started with a full set of learning videos

When we watch videos and learn, we can’t just move our eyes and brain without using our hands. A more scientific learning method is to use them after understanding. At this time, the hands-on project is very suitable.

insert image description here

Three, Python operation example

Learning python is the same as learning mathematics. You can’t just read the book without doing the questions. Looking directly at the steps and answers will make people mistakenly think that you have mastered everything, but you will still be at a loss when you encounter a problem.

Therefore, in the process of learning python, you must remember to write more codes by hand. You only need to read the tutorial once or twice.

insert image description here

4. Python employment project actual combat

We must learn Python to find a high-paying job or a high-paying part-time job. The following are some practical projects that companies can use. After learning these, I believe everyone will be able to find a satisfactory job.

insert image description here

11 Django Framework

insert image description here

16 WeChat public account
insert image description here

18 Common crawler module usage

insert image description here

21 Data Analysis

insert image description here

22 Machine Learning
insert image description here

There are other things, such as my own Python introductory graphic tutorials, you can use your mobile phone to learn knowledge when you don’t have a computer, and after learning the theory, you can type the code to practice verification, and there is also the library information of the Chinese version of Python. , MySQL and HTML tags, etc., these are things that can be given to fans.

Data collection

These are not very valuable things, but they are really good for learners who have no resources or the resources are not very good. If you can use it, you can scan the QR code of CSDN official certification below on WeChat [free access]↓↓↓ .

insert image description here

Good article recommendation

Understand the prospect of python: https://blog.csdn.net/SpringJavaMyBatis/article/details/127194835

Learn about python's part-time sideline: https://blog.csdn.net/SpringJavaMyBatis/article/details/127196603

Guess you like

Origin blog.csdn.net/weixin_49895216/article/details/130962610