程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python office automation practice 10 | Python docx Library: the perfect combination of Python and word_ Teach you how to manage data in word tables? Let you cook cattle with ease

編輯:Python

One 、 Introduction to the topic

This topic mainly explains how to delete Word Data in tables in documents .

Two 、 Special case effect

3、 ... and 、 Topic content

3.1 Delete cell data

Deletion of cell data is essentially the same as assignment , It's just that the assignment is an empty string , namely ’'. There are also two ways to delete cell data , One is direct cell.text The assignment is an empty string , Another way is to use paragraphs , Paragraphs text Attribute is assigned an empty string .

Example :
(1) In the project Code In the directory , stay Code New under the directory clearTable01.py file .

(2) Enter the code as follows :

clearTable01.py

fro

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved