Skip to content

PythonOffices

kcp edited this page Jul 13, 2020 · 2 revisions

title: Python 操作 Offices文档 date: 2018-12-15 12:08:39 tags: - Offices categories: - Python

目录 start

  1. Offices文档
    1. Word
    2. Excel
      1. xlrd
      2. pandas

目录 end|2020-04-27 23:42|


Offices文档

Word

Excel

参考: Python-Excel 模块哪家强?

xlrd

Github addr

    import xlrd 

    data = xlrd.open_workbook('monster.xlsx')
    table = data.sheets()[0]   
    nrows = table.nrows
    for i in range(nrows):
        for cell in table.row_values(i):
            print(cell, ' | ', end='')
        print()

pandas

Official Site

Summary

Clone this wiki locally