本文由 大侠(AhcaoZhu)原创,转载请声明。
链接: https://blog.csdn.net/Ahcao2008
一图看懂 docx 读取、查询、修改 Ms Word docx 文件, 资料整理+笔记(大全)
- 摘要
- 模块
- 类的关系图
- 模块全展开
- 统计
- 【docx】
- 常量
- 模块
- 函数
- 类
- 统计
- 【docx.opc】
- 模块
- 统计
- 【docx.compat】
- 模块
- 函数
- 类
-
- 3 collections.abc.Sequence
- 4 _io.BytesIO
-
- data
- method
- 2 close(self, *args, **kwargs)
- 3 flush(self, *args, **kwargs)
- 4 getbuffer(self, *args, **kwargs)
- 5 getvalue(self, *args, **kwargs)
- 6 isatty(self, *args, **kwargs)
- 7 read(self, *args, **kwargs)
- 8 read1(self, *args, **kwargs)
- 9 readable(self, *args, **kwargs)
- 10 readinto(self, *args, **kwargs)
- 11 readline(self, *args, **kwargs)
- 12 readlines(self, *args, **kwargs)
- 13 seek(self, *args, **kwargs)
- 14 seekable(self, *args, **kwargs)
- 15 tell(self, *args, **kwargs)
- 16 truncate(self, *args, **kwargs)
- 17 writable(self, *args, **kwargs)
- 18 write(self, *args, **kwargs)
- 19 writelines(self, *args, **kwargs)
- 5 str
-
- method
- 1 capitalize()
- 2 casefold()
- 3 center()
- 4 count()
- 5 encode()
- 6 endswith()
- 7 expandtabs()
- 8 find()
- 9 format()
- 10 format_map()
- 11 index()
- 12 isalnum()
- 13 isalpha()
- 14 isascii()
- 15 isdecimal()
- 16 isdigit()
- 17 isidentifier()
- 18 islower()
- 19 isnumeric()
- 20 isprintable()
- 21 isspace()
- 22 istitle()
- 23 isupper()
- 24 join()
- 25 ljust()
- 26 lower()
- 27 lstrip()
- 28 partition()
- 29 replace()
- 30 rfind()
- 31 rindex()
- 32 rjust()
- 33 rpartition()
- 34 rsplit()
- 35 rstrip()
- 36 split()
- 37 splitlines()
- 38 startswith()
- 39 strip()
- 40 swapcase()
- 41 title()
- 42 translate()
- 43 upper()
- 44 zfill()
- static method
- 45 maketrans()
- 剩余
- 统计
- 【docx.shared】
- 函数
- 类
- 剩余
- 统计
- 【docx.image】
- 常量
- 模块
- 类
- 剩余
- 统计
- 【docx.exceptions】
- 类
- 统计
- 【docx.enum】
- 模块
- 类
- 剩余
- 统计
- 【docx.oxml】
- 常量
- 模块
- 函数
- 类
-
- 20 docx.oxml.ns.NamespacePrefixedTag
- 21 docx.oxml.shared.CT_DecimalNumber
- 22 docx.oxml.shared.CT_OnOff
- 23 docx.oxml.shared.CT_String
- 24 docx.oxml.coreprops.CT_CoreProperties
-
- property
- method
- 31 get_or_add_category()
- 32 get_or_add_contentStatus()
- 33 get_or_add_created()
- 34 get_or_add_creator()
- 35 get_or_add_description()
- 36 get_or_add_identifier()
- 37 get_or_add_keywords()
- 38 get_or_add_language()
- 39 get_or_add_lastModifiedBy()
- 40 get_or_add_lastPrinted()
- 41 get_or_add_modified()
- 42 get_or_add_revision()
- 43 get_or_add_subject()
- 44 get_or_add_title()
- 45 get_or_add_version()
- class method
- 46 new()
- 25 docx.oxml.document.CT_Body
- 26 docx.oxml.document.CT_Document
- 27 docx.oxml.numbering.CT_Num
- 28 docx.oxml.numbering.CT_Numbering
- 29 docx.oxml.numbering.CT_NumLvl
- 30 docx.oxml.numbering.CT_NumPr
- 31 docx.oxml.section.CT_HdrFtr
- 32 docx.oxml.section.CT_HdrFtrRef
- 33 docx.oxml.section.CT_PageMar
- 34 docx.oxml.section.CT_PageSz
- 35 docx.oxml.section.CT_SectPr
- 36 docx.oxml.section.CT_SectType
- 37 docx.oxml.settings.CT_Settings
- 38 docx.oxml.shape.CT_Blip
- 39 docx.oxml.shape.CT_BlipFillProperties
- 40 docx.oxml.shape.CT_GraphicalObject
- 41 docx.oxml.shape.CT_GraphicalObjectData
- 42 docx.oxml.shape.CT_Inline
- 43 docx.oxml.shape.CT_NonVisualDrawingProps
- 44 docx.oxml.shape.CT_Picture
- 45 docx.oxml.shape.CT_PictureNonVisual
- 46 docx.oxml.shape.CT_Point2D
- 47 docx.oxml.shape.CT_PositiveSize2D
- 48 docx.oxml.shape.CT_ShapeProperties
- 49 docx.oxml.shape.CT_Transform2D
- 50 docx.oxml.styles.CT_LatentStyles
- 51 docx.oxml.styles.CT_LsdException
- 52 docx.oxml.styles.CT_Style
- 53 docx.oxml.styles.CT_Styles
- 54 docx.oxml.table.CT_Height
- 55 docx.oxml.table.CT_Row
- 56 docx.oxml.table.CT_Tbl
- 57 docx.oxml.table.CT_TblGrid
- 58 docx.oxml.table.CT_TblGridCol
- 59 docx.oxml.table.CT_TblLayoutType
- 60 docx.oxml.table.CT_TblPr
- 61 docx.oxml.table.CT_TblWidth
- 62 docx.oxml.table.CT_Tc
- 63 docx.oxml.table.CT_TcPr
- 64 docx.oxml.table.CT_TrPr
- 65 docx.oxml.table.CT_VMerge
- 66 docx.oxml.table.CT_VerticalJc
- 67 docx.oxml.text.font.CT_Color
- 68 docx.oxml.text.font.CT_Fonts
- 69 docx.oxml.text.font.CT_Highlight
- 70 docx.oxml.text.font.CT_HpsMeasure
- 71 docx.oxml.text.font.CT_RPr
-
- property
- method
- 36 get_or_add_b()
- 37 get_or_add_bCs()
- 38 get_or_add_caps()
- 39 get_or_add_color()
- 40 get_or_add_cs()
- 41 get_or_add_dstrike()
- 42 get_or_add_emboss()
- 43 get_or_add_highlight()
- 44 get_or_add_i()
- 45 get_or_add_iCs()
- 46 get_or_add_imprint()
- 47 get_or_add_noProof()
- 48 get_or_add_oMath()
- 49 get_or_add_outline()
- 50 get_or_add_rFonts()
- 51 get_or_add_rStyle()
- 52 get_or_add_rtl()
- 53 get_or_add_shadow()
- 54 get_or_add_smallCaps()
- 55 get_or_add_snapToGrid()
- 56 get_or_add_specVanish()
- 57 get_or_add_strike()
- 58 get_or_add_sz()
- 59 get_or_add_u()
- 60 get_or_add_vanish()
- 61 get_or_add_vertAlign()
- 62 get_or_add_webHidden()
- 72 docx.oxml.text.font.CT_Underline
- 73 docx.oxml.text.font.CT_VerticalAlignRun
- 74 docx.oxml.text.paragraph.CT_P
- 75 docx.oxml.text.parfmt.CT_Ind
- 76 docx.oxml.text.parfmt.CT_Jc
- 77 docx.oxml.text.parfmt.CT_PPr
- 78 docx.oxml.text.parfmt.CT_Spacing
- 79 docx.oxml.text.parfmt.CT_TabStop
- 80 docx.oxml.text.parfmt.CT_TabStops
- 81 docx.oxml.text.run.CT_Br
- 82 docx.oxml.text.run.CT_R
- 83 docx.oxml.text.run.CT_Text
- 剩余
- 统计
- 【docx.parts】
- 常量
- 模块
- 统计
- 【docx.package】
- 函数
- 类
- 剩余
- 统计
- 【docx.api】
- 模块
- 函数
- 类
- 私有或局部
- 剩余
- 统计
- 【docx.text】
- 模块
- 统计
- 【docx.dml】
- 模块
- 统计
- 【docx.shape】
- 常量
- 类
- 剩余
- 统计
- 【docx.blkcntnr】
- 类
- 剩余
- 统计
- 【docx.section】
- 函数
- 类
- 私有或局部
- 剩余
- 统计
- 【docx.document】
- 常量
- 类
- 私有或局部
- 剩余
- 统计
- 【docx.settings】
- 类
- 剩余
- 统计
- 【docx.styles】
- 模块
- 类
- 剩余
- 统计
- 【docx.table】
- 函数
- 类
- 私有或局部
- 剩余
摘要
全文介绍系统内置 python- docx 模块、函数、类及类的方法和属性。
它通过代码抓取并经AI智能翻译和人工校对。
是一部不可多得的权威字典类工具书。它是系列集的一部分。后续陆续发布、敬请关注。【原创:AhcaoZhu大侠】
模块
docx
docx.opc◎
docx.compat
docx.shared
docx.image◎
docx.exceptions
docx.enum◎
docx.oxml◎
docx.parts◎
docx.package
docx.api
docx.text◎
docx.dml◎
docx.shape
docx.blkcntnr
docx.section
docx.document
docx.settings
docx.styles◎
docx.table??
◎--package
??--需要单独装载
docx - modules
类的关系图
◆object
◆BaseException
◆Exception
docx.exceptions.PythonDocxError
docx.exceptions.InvalidSpanError
docx.exceptions.InvalidXmlError
◆collections.abc.Container
◆collections.abc.Iterable
◆collections.abc.Sized
◆collections.abc.Collection
◆collections.abc.Reversible
◆collections.abc.Sequence
docx.section.Sections
docx.enum.Enumeration
docx.enum.base.Enumeration
docx.enum.base.XmlEnumeration
docx.enum.section.WD_HEADER_FOOTER_INDEX
docx.enum.section.WD_SECTION_START
docx.enum.style.WD_STYLE_TYPE
docx.enum.shape.WD_INLINE_SHAPE_TYPE
docx.enum.text.WD_BREAK_TYPE
docx.image.image.BaseImageHeader
docx.image.bmp.Bmp
docx.image.gif.Gif
docx.image.jpeg.Jpeg
docx.image.jpeg.Exif
docx.image.jpeg.Jfif
docx.image.png.Png
docx.image.tiff.Tiff
docx.image.image.Image
docx.opc.constants.CONTENT_TYPE
docx.opc.constants.RELATIONSHIP_TYPE
docx.opc.package.OpcPackage
docx.package.Package
docx.opc.part.Part
docx.parts.image.ImagePart
docx.oxml.simpletypes.BaseSimpleType
docx.oxml.simpletypes.BaseStringType
docx.oxml.simpletypes.BaseStringEnumerationType
docx.oxml.simpletypes.XsdStringEnumeration
docx.oxml.simpletypes.ST_Merge
docx.package.ImageParts
docx.section.Section
docx.shape.InlineShape
docx.shared.ElementProxy
docx.document.Document
docx.settings.Settings
docx.shared.Parented
docx.blkcntnr.BlockItemContainer
docx.document._Body
docx.section._BaseHeaderFooter
docx.section._Footer
docx.section._Header
docx.table._Cell
docx.shape.InlineShapes
docx.table.Table
docx.table._Column
docx.table._Columns
docx.table._Row
docx.table._Rows
docx.text.paragraph.Paragraph
docx.styles.BabelFish
◆int
docx.shared.Length
docx.shared.Cm
docx.shared.Emu
docx.shared.Inches
docx.shared.Mm
docx.shared.Pt
docx.shared.Twips
◆lxml.etree._Element
◆lxml.etree.ElementBase
docx.oxml.xmlchemy.BaseOxmlElement
docx.oxml.coreprops.CT_CoreProperties
docx.oxml.document.CT_Body
docx.oxml.document.CT_Document
docx.oxml.numbering.CT_Num
docx.oxml.numbering.CT_NumLvl
docx.oxml.numbering.CT_NumPr
docx.oxml.numbering.CT_Numbering
docx.oxml.section.CT_HdrFtr
docx.oxml.section.CT_HdrFtrRef
docx.oxml.section.CT_PageMar
docx.oxml.section.CT_PageSz
docx.oxml.section.CT_SectPr
docx.oxml.section.CT_SectType
docx.oxml.settings.CT_Settings
docx.oxml.shape.CT_Blip
docx.oxml.shape.CT_BlipFillProperties
docx.oxml.shape.CT_GraphicalObject
docx.oxml.shape.CT_GraphicalObjectData
docx.oxml.shape.CT_Inline
docx.oxml.shape.CT_NonVisualDrawingProps
docx.oxml.shape.CT_Picture
docx.oxml.shape.CT_PictureNonVisual
docx.oxml.shape.CT_Point2D
docx.oxml.shape.CT_PositiveSize2D
docx.oxml.shape.CT_ShapeProperties
docx.oxml.shape.CT_Transform2D
docx.oxml.shared.CT_DecimalNumber
docx.oxml.shared.CT_OnOff
docx.oxml.shared.CT_String
docx.oxml.styles.CT_LatentStyles
docx.oxml.styles.CT_LsdException
docx.oxml.styles.CT_Style
docx.oxml.styles.CT_Styles
docx.oxml.table.CT_Height
docx.oxml.table.CT_Row
docx.oxml.table.CT_Tbl
docx.oxml.table.CT_TblGrid
docx.oxml.table.CT_TblGridCol
docx.oxml.table.CT_TblLayoutType
docx.oxml.table.CT_TblPr
docx.oxml.table.CT_TblWidth
docx.oxml.table.CT_Tc
docx.oxml.table.CT_TcPr
docx.oxml.table.CT_TrPr
docx.oxml.table.CT_VMerge
docx.oxml.table.CT_VerticalJc
docx.oxml.text.font.CT_Color
docx.oxml.text.font.CT_Fonts
docx.oxml.text.font.CT_Highlight
docx.oxml.text.font.CT_HpsMeasure
docx.oxml.text.font.CT_RPr
docx.oxml.text.font.CT_Underline
docx.oxml.text.font.CT_VerticalAlignRun
docx.oxml.text.paragraph.CT_P
docx.oxml.text.parfmt.CT_Ind
docx.oxml.text.parfmt.CT_Jc
docx.oxml.text.parfmt.CT_PPr
docx.oxml.text.parfmt.CT_Spacing
docx.oxml.text.parfmt.CT_TabStop
docx.oxml.text.parfmt.CT_TabStops
docx.oxml.text.run.CT_Br
docx.oxml.text.run.CT_R
docx.oxml.text.run.CT_Text
◆str
docx.opc.packuri.PackURI
docx.oxml.ns.NamespacePrefixedTag
◆tuple
docx.shared.RGBColor
◆-- External class, not in docx module
模块全展开
统计
序号 | 类别 | 数量 |
---|---|---|
4 | str | 5 |
6 | list | 1 |
8 | dict | 1 |
9 | module | 19 |
10 | class | 2 |
11 | function | 1 |
13 | residual | 3 |
14 | system | 10 |
16 | all | 32 |
【docx】
docx, fullname=docx, file=docx_init_.py
常量
模块
1 docx.opc
opc, fullname=docx.opc, file=docx\opc_init_.py
2 docx.compat
compat, fullname=docx.compat, file=docx\compat.py