<?xml version="1.0" encoding="gbk"?>
<rss version="2.0">
  <channel>
    <title>21番茄网 - Python自动化办公</title>
    <link>http://www.21fanqie.com/forum-46-1.html</link>
    <description>Latest 20 threads of Python自动化办公</description>
    <copyright>Copyright(C) 21番茄网</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Thu, 26 Nov 2026 23:53:32 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>http://www.21fanqie.com/static/image/common/logo_88_31.gif</url>
      <title>21番茄网</title>
      <link>http://www.21fanqie.com/</link>
    </image>
    <item>
      <title>python操作excel注意事项</title>
      <link>http://www.21fanqie.com/thread-568-1-1.html</link>
      <description><![CDATA[python操作excel注意事项


1.磁盘空间要充足，磁盘空间不够了，会导致excel损坏。
2.python操作excel之前，最好进行excel的备份，以免excle损坏后，数据丢失。]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Sat, 23 Apr 2022 12:54:23 +0000</pubDate>
    </item>
    <item>
      <title>用xlrd 模块操作excel中</title>
      <link>http://www.21fanqie.com/thread-527-1-1.html</link>
      <description><![CDATA[用xlrd 模块操作excel中


    1）获取book中一个工作表

    table = data.sheets()[0]              #通过索引顺序获取
    table = data.sheet_by_index(sheet_indx))      #通过索引顺序获取
    table = data.sheet_by_name(sheet_name)     #通过名称获取 ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Mon, 01 Nov 2021 08:44:40 +0000</pubDate>
    </item>
    <item>
      <title>python 获取excel文件的所有sheet（工作表）名称</title>
      <link>http://www.21fanqie.com/thread-526-1-1.html</link>
      <description><![CDATA[1. 使用pandas


import pandas
file_path = \'1.xlsx\'
xls = pandas.ExcelFile(file_path)
sheet_names = xls.sheet_names


2. 使用openpyxl


import openpyxl
file_path = \'1.xlsx\'
xls = openpyxl.load_workbook(file_path)
sheet_names = xls ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Mon, 01 Nov 2021 07:15:17 +0000</pubDate>
    </item>
    <item>
      <title>openpyxl自动删除excel中指定行的数据的方法</title>
      <link>http://www.21fanqie.com/thread-433-1-1.html</link>
      <description><![CDATA[]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Thu, 18 Feb 2021 07:16:56 +0000</pubDate>
    </item>
    <item>
      <title>用openpyxl 给excel新建表名，用到create_sheet</title>
      <link>http://www.21fanqie.com/thread-405-1-1.html</link>
      <description><![CDATA[用openpyxl 给excel新建表名，用到create_sheet

from openpyxl import Workbook

wb = Workbook()
excel_address = r\&quot;E:\\Coding\\E_PythonWriting\\Excel\\openpyxl示例_5.xlsx\&quot;

sht = wb.worksheets[0]
sht[\&quot;A1\&quot;] = 1
sht.title = \&quot;首页\&quot;

sht_2 = wb.create ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Wed, 03 Feb 2021 08:05:43 +0000</pubDate>
    </item>
    <item>
      <title>用openpyxl的iter_rows来读取多行数据时，修改数据的方法</title>
      <link>http://www.21fanqie.com/thread-390-1-1.html</link>
      <description><![CDATA[用openpyxl的iter_rows来读取多行数据时，修改数据的方法

from openpyxl import load_workbook

path=\'具体路径\'
A=load_workbook(path)
biao=A.active
for row in biao.iter_rows(max_row=biao.max_row):
    for cell in row:
        #print(cell)
       ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Mon, 25 Jan 2021 08:10:15 +0000</pubDate>
    </item>
    <item>
      <title>用openpyxl按行取数的另外一种方法</title>
      <link>http://www.21fanqie.com/thread-389-1-1.html</link>
      <description><![CDATA[用openpyxl按行取数的另外一种方法
      这种方法的思路是，算出最多行数，然后以行数来循环，直接定位行来取数，这种方法的好处是可以定位到某个特定值所在的行编号。从而可以用ws.delete_rows(开始行, 删除的行数)来删除行。

import openpyxl,xlrd,os
from open ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Mon, 25 Jan 2021 08:06:16 +0000</pubDate>
    </item>
    <item>
      <title>写入excel前查重</title>
      <link>http://www.21fanqie.com/thread-388-1-1.html</link>
      <description><![CDATA[写入excel前查重：

C=load_workbook(path)
biao2=C[\'招标公告\']
name_list=[]
for name in biao2.iter_rows(min_row=2,min_col=1,max_col=1,values_only=True):
    name_list.append(name[0])
    #print(name[0])
for information in link_need:
    if inf ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Sat, 23 Jan 2021 07:40:35 +0000</pubDate>
    </item>
    <item>
      <title>openpyxl再总结（含官方链接）</title>
      <link>http://www.21fanqie.com/thread-386-1-1.html</link>
      <description><![CDATA[]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 08:44:16 +0000</pubDate>
    </item>
    <item>
      <title>r+，w+，a+的解释</title>
      <link>http://www.21fanqie.com/thread-385-1-1.html</link>
      <description><![CDATA[r+，w+，a+的解释


r+：打开文件，光标在开头的位置，可以从头读取相关文件。如果要写入文字，文字从头开始写入，写入的文字从头开始覆盖原文内容。

w+：打开文件，自动清除原文件中的所有内容，写完以后，光标在最后位置。如果要读取，需要用file_1.seek(0)，把 ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 07:54:08 +0000</pubDate>
    </item>
    <item>
      <title>获取excel文件中所有表格的名称</title>
      <link>http://www.21fanqie.com/thread-384-1-1.html</link>
      <description><![CDATA[获取excel文件中所有表格的名称]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 03:58:32 +0000</pubDate>
    </item>
    <item>
      <title>常用代码模板</title>
      <link>http://www.21fanqie.com/thread-383-1-1.html</link>
      <description><![CDATA[常用代码模板

1.excel：http://www.21fanqie.com/thread-381-1-1.html

2.从一堆文件里筛选出想要的txt文件：http://www.21fanqie.com/thread-376-1-1.html]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 03:38:35 +0000</pubDate>
    </item>
    <item>
      <title>freegames（玩游戏）和pillow库（图像处理）</title>
      <link>http://www.21fanqie.com/thread-382-1-1.html</link>
      <description><![CDATA[一、freegames

第一步：照例在终端输入pip install freegames下载这个库。

第二步：下载完成后在终端输入python -m freegames list回车，就可以在终端显示库里所有的游戏清单。

第三步：在终端输入python -m freegames.snake。
       就可以开始贪吃蛇的小游 ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 03:26:00 +0000</pubDate>
    </item>
    <item>
      <title>excel常用练习</title>
      <link>http://www.21fanqie.com/thread-381-1-1.html</link>
      <description><![CDATA[excel常用练习

# 从openpyxl库导入load_workbook函数
from openpyxl import load_workbook

# 打开【10月员工绩效表】的工作簿，获取活动工作表
performance_wb = load_workbook(\'./material/10月员工绩效表.xlsx\')
performance_ws = performance_wb.active

 ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 02:33:55 +0000</pubDate>
    </item>
    <item>
      <title>os.path.join()构造文件路径</title>
      <link>http://www.21fanqie.com/thread-379-1-1.html</link>
      <description><![CDATA[path参数表示它至少要有一个路径组件，否则函数调用会报错。

      os.path.join()是python内置的os模块内的path模块内的函数。下图是它在源代码中的声明。其中path参数表示它至少要有一个路径组件，否则函数调用会报错。



      join函数的作用是把两个或者多 ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 02:14:09 +0000</pubDate>
    </item>
    <item>
      <title>从一堆文件里筛选出想要的txt文件</title>
      <link>http://www.21fanqie.com/thread-376-1-1.html</link>
      <description><![CDATA[从一堆文件里筛选出想要的txt文件

import os

# 设置文件夹路径，获取文件夹下的所有文件名
path = \'./工作文件夹/\'
files_list = os.listdir(path)

# 设置需要查找的关键词
key_word = input(\&quot;请输入要查找的关键词：\&quot;)

# 打开结果文件
result_file = o ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 01:41:54 +0000</pubDate>
    </item>
    <item>
      <title>Python之Pandas使用教程</title>
      <link>http://www.21fanqie.com/thread-375-1-1.html</link>
      <description><![CDATA[Python之Pandas使用教程

1.Pandas概述
Pandas是Python的一个数据分析包，该工具为解决数据分析任务而创建。
Pandas纳入大量库和标准数据模型，提供高效的操作数据集所需的工具。
Pandas提供大量能使我们快速便捷地处理数据的函数和方法。
Pandas是字典形式，基于 ...]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Fri, 22 Jan 2021 00:36:58 +0000</pubDate>
    </item>
    <item>
      <title>excel创建表格</title>
      <link>http://www.21fanqie.com/thread-374-1-1.html</link>
      <description><![CDATA[excel创建表格]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Thu, 21 Jan 2021 09:28:20 +0000</pubDate>
    </item>
    <item>
      <title>把两个列表合并为字典的方法</title>
      <link>http://www.21fanqie.com/thread-373-1-1.html</link>
      <description><![CDATA[把两个列表合并为字典的方法

一般就是这样写：

详见：

https://blog.csdn.net/qq_17249717/article/details/99229281

https://www.cnblogs.com/yooma/p/8065434.html]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Thu, 21 Jan 2021 09:25:59 +0000</pubDate>
    </item>
    <item>
      <title>创建excel的时候，是不需要输入网址的</title>
      <link>http://www.21fanqie.com/thread-372-1-1.html</link>
      <description><![CDATA[创建excel的时候，是不需要输入网址的]]></description>
      <category>Python自动化办公</category>
      <author>21fanqie</author>
      <pubDate>Thu, 21 Jan 2021 09:23:20 +0000</pubDate>
    </item>
  </channel>
</rss>