在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 使用Python创建和修改Word文档

使用Python创建和修改Word文档

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:43.55M
  • 下载次数:2
  • 浏览次数:44
  • 发布时间:2024-06-02
  • 实例类别:一般编程问题
  • 发 布 人:chenxiaolan
  • 文件格式:.zip
  • 所需积分:2
 相关标签:

实例介绍

【实例简介】

python-docx是一个用于读取、创建和更新Microsoft Word 2007 (.docx)文件的Python库。

使用pip install python-docx进行安装。

示例代码如下:
from docx import Document
# 创建新文档
document = Document()
document.add_paragraph('It was a dark and stormy night.')
document.save('dark-and-stormy.docx')
# 读取文档并获取段落文本
document = Document('dark-and-stormy.docx')
document.paragraphs[0].text

【实例截图】
【核心代码】
文件清单
└── python-docx-0cf6d71fb47ede07ecd5de2a8655f9f46c5f083d
    ├── docs
    │   ├── api
    │   │   ├── dml.rst
    │   │   ├── document.rst
    │   │   ├── enum
    │   │   │   ├── index.rst
    │   │   │   ├── MsoColorType.rst
    │   │   │   ├── MsoThemeColorIndex.rst
    │   │   │   ├── WdAlignParagraph.rst
    │   │   │   ├── WdBuiltinStyle.rst
    │   │   │   ├── WdCellVerticalAlignment.rst
    │   │   │   ├── WdColorIndex.rst
    │   │   │   ├── WdLineSpacing.rst
    │   │   │   ├── WdOrientation.rst
    │   │   │   ├── WdRowAlignment.rst
    │   │   │   ├── WdRowHeightRule.rst
    │   │   │   ├── WdSectionStart.rst
    │   │   │   ├── WdStyleType.rst
    │   │   │   ├── WdTabAlignment.rst
    │   │   │   ├── WdTabLeader.rst
    │   │   │   ├── WdTableDirection.rst
    │   │   │   └── WdUnderline.rst
    │   │   ├── section.rst
    │   │   ├── settings.rst
    │   │   ├── shape.rst
    │   │   ├── shared.rst
    │   │   ├── style.rst
    │   │   ├── table.rst
    │   │   └── text.rst
    │   ├── conf.py
    │   ├── dev
    │   │   └── analysis
    │   │       ├── features
    │   │       │   ├── coreprops.rst
    │   │       │   ├── header.rst
    │   │       │   ├── numbering.rst
    │   │       │   ├── sections.rst
    │   │       │   ├── settings.rst
    │   │       │   ├── shapes
    │   │       │   │   ├── index.rst
    │   │       │   │   ├── picture.rst
    │   │       │   │   ├── shapes-inline.rst
    │   │       │   │   └── shapes-inline-size.rst
    │   │       │   ├── styles
    │   │       │   │   ├── character-style.rst
    │   │       │   │   ├── index.rst
    │   │       │   │   ├── latent-styles.rst
    │   │       │   │   ├── paragraph-style.rst
    │   │       │   │   ├── style.rst
    │   │       │   │   └── styles.rst
    │   │       │   ├── table
    │   │       │   │   ├── cell-merge.rst
    │   │       │   │   ├── index.rst
    │   │       │   │   ├── table-cell.rst
    │   │       │   │   ├── table-props.rst
    │   │       │   │   └── table-row.rst
    │   │       │   └── text
    │   │       │       ├── breaks.rst
    │   │       │       ├── font-color.rst
    │   │       │       ├── font-highlight-color.rst
    │   │       │       ├── font.rst
    │   │       │       ├── hyperlink.rst
    │   │       │       ├── index.rst
    │   │       │       ├── paragraph-format.rst
    │   │       │       ├── run-content.rst
    │   │       │       ├── tab-stops.rst
    │   │       │       └── underline.rst
    │   │       ├── index.rst
    │   │       └── schema
    │   │           ├── ct_body.rst
    │   │           ├── ct_document.rst
    │   │           └── ct_p.rst
    │   ├── index.rst
    │   ├── Makefile
    │   ├── _static
    │   │   └── img
    │   │       ├── example-docx-01.png
    │   │       ├── hdrftr-01.png
    │   │       └── hdrftr-02.png
    │   ├── _templates
    │   │   └── sidebarlinks.html
    │   ├── _themes
    │   │   └── armstrong
    │   │       ├── layout.html
    │   │       ├── LICENSE
    │   │       ├── rtd-themes.conf
    │   │       ├── static
    │   │       │   └── rtd.css_t
    │   │       ├── theme.conf
    │   │       └── theme.conf.orig
    │   └── user
    │       ├── api-concepts.rst
    │       ├── documents.rst
    │       ├── hdrftr.rst
    │       ├── install.rst
    │       ├── quickstart.rst
    │       ├── sections.rst
    │       ├── shapes.rst
    │       ├── styles-understanding.rst
    │       ├── styles-using.rst
    │       ├── tables.rst
    │       └── text.rst
    ├── features
    │   ├── api-open-document.feature
    │   ├── blk-add-paragraph.feature
    │   ├── blk-add-table.feature
    │   ├── blk-iter-inner-content.feature
    │   ├── doc-access-collections.feature
    │   ├── doc-access-sections.feature
    │   ├── doc-add-heading.feature
    │   ├── doc-add-page-break.feature
    │   ├── doc-add-paragraph.feature
    │   ├── doc-add-picture.feature
    │   ├── doc-add-section.feature
    │   ├── doc-add-table.feature
    │   ├── doc-coreprops.feature
    │   ├── doc-settings.feature
    │   ├── doc-styles.feature
    │   ├── environment.py
    │   ├── hdr-header-footer.feature
    │   ├── hlk-props.feature
    │   ├── img-characterize-image.feature
    │   ├── num-access-numbering-part.feature
    │   ├── par-access-inner-content.feature
    │   ├── par-access-parfmt.feature
    │   ├── par-add-run.feature
    │   ├── par-alignment-prop.feature
    │   ├── par-clear-paragraph.feature
    │   ├── par-insert-paragraph.feature
    │   ├── par-set-text.feature
    │   ├── par-style-prop.feature
    │   ├── pbk-split-para.feature
    │   ├── run-access-font.feature
    │   ├── run-access-inner-content.feature
    │   ├── run-add-content.feature
    │   ├── run-add-picture.feature
    │   ├── run-char-style.feature
    │   ├── run-clear-run.feature
    │   ├── run-enum-props.feature
    │   ├── sct-section.feature
    │   ├── shp-inline-shape-access.feature
    │   ├── shp-inline-shape-size.feature
    │   ├── steps
    │   │   ├── api.py
    │   │   ├── block.py
    │   │   ├── coreprops.py
    │   │   ├── document.py
    │   │   ├── font.py
    │   │   ├── hdrftr.py
    │   │   ├── helpers.py
    │   │   ├── hyperlink.py
    │   │   ├── image.py
    │   │   ├── numbering.py
    │   │   ├── pagebreak.py
    │   │   ├── paragraph.py
    │   │   ├── parfmt.py
    │   │   ├── section.py
    │   │   ├── settings.py
    │   │   ├── shape.py
    │   │   ├── shared.py
    │   │   ├── styles.py
    │   │   ├── table.py
    │   │   ├── tabstops.py
    │   │   ├── test_files
    │   │   │   ├── blk-containing-table.docx
    │   │   │   ├── blk-paras-and-tables.docx
    │   │   │   ├── court-exif.jpg
    │   │   │   ├── doc-access-sections.docx
    │   │   │   ├── doc-add-section.docx
    │   │   │   ├── doc-coreprops.docx
    │   │   │   ├── doc-default.docx
    │   │   │   ├── doc-no-coreprops.docx
    │   │   │   ├── doc-odd-even-hdrs.docx
    │   │   │   ├── doc-word-default-blank.docx
    │   │   │   ├── fnt-color.docx
    │   │   │   ├── hdr-header-footer.docx
    │   │   │   ├── jfif-300-dpi.jpg
    │   │   │   ├── jpeg420exif.jpg
    │   │   │   ├── lena.bmp
    │   │   │   ├── lena.gif
    │   │   │   ├── lena_std.jpg
    │   │   │   ├── lena.tif
    │   │   │   ├── monty-truth.png
    │   │   │   ├── mountain.bmp
    │   │   │   ├── num-having-numbering-part.docx
    │   │   │   ├── par-alignment.docx
    │   │   │   ├── par-hlink-frags.docx
    │   │   │   ├── par-hyperlinks.docx
    │   │   │   ├── par-known-paragraphs.docx
    │   │   │   ├── par-known-styles.docx
    │   │   │   ├── par-rendered-page-breaks.docx
    │   │   │   ├── python-icon.jpeg
    │   │   │   ├── run-char-style.docx
    │   │   │   ├── run-enumerated-props.docx
    │   │   │   ├── sample.tif
    │   │   │   ├── sct-first-page-hdrftr.docx
    │   │   │   ├── sct-inner-content.docx
    │   │   │   ├── sct-section-props.docx
    │   │   │   ├── set-no-settings-part.docx
    │   │   │   ├── shp-inline-shape-access.docx
    │   │   │   ├── sty-behav-props.docx
    │   │   │   ├── sty-having-no-styles-part.docx
    │   │   │   ├── sty-having-styles-part.docx
    │   │   │   ├── sty-known-styles.docx
    │   │   │   ├── tab-stops.docx
    │   │   │   ├── tbl-2x2-table.docx
    │   │   │   ├── tbl-cell-access.docx
    │   │   │   ├── tbl-cell-props.docx
    │   │   │   ├── tbl-col-props.docx
    │   │   │   ├── tbl-having-applied-style.docx
    │   │   │   ├── tbl-having-tables.docx
    │   │   │   ├── tbl-on-off-props.docx
    │   │   │   ├── tbl-props.docx
    │   │   │   ├── test.png
    │   │   │   ├── txt-font-highlight-color.docx
    │   │   │   └── txt-font-props.docx
    │   │   └── text.py
    │   ├── sty-access-font.feature
    │   ├── sty-access-latent-styles.feature
    │   ├── sty-access-parfmt.feature
    │   ├── sty-add-style.feature
    │   ├── sty-delete-style.feature
    │   ├── sty-latent-add-del.feature
    │   ├── sty-latent-props.feature
    │   ├── sty-style-props.feature
    │   ├── tab-access-tabs.feature
    │   ├── tab-tabstop-props.feature
    │   ├── tbl-add-row-or-col.feature
    │   ├── tbl-cell-access.feature
    │   ├── tbl-cell-add-table.feature
    │   ├── tbl-cell-props.feature
    │   ├── tbl-cell-text.feature
    │   ├── tbl-col-props.feature
    │   ├── tbl-item-access.feature
    │   ├── tbl-merge-cells.feature
    │   ├── tbl-props.feature
    │   ├── tbl-row-props.feature
    │   ├── tbl-style.feature
    │   ├── txt-add-break.feature
    │   ├── txt-font-color.feature
    │   ├── txt-font-props.feature
    │   └── txt-parfmt-props.feature
    ├── HISTORY.rst
    ├── LICENSE
    ├── Makefile
    ├── MANIFEST.in
    ├── pyproject.toml
    ├── README.md
    ├── ref
    │   ├── ISO-IEC-29500-1.pdf
    │   ├── ISO-IEC-29500-2.pdf
    │   ├── ISO-IEC-29500-3.pdf
    │   ├── ISO-IEC-29500-4.pdf
    │   ├── rnc
    │   │   ├── any.rnc
    │   │   ├── dml-chartDrawing.rnc
    │   │   ├── dml-chart.rnc
    │   │   ├── dml-diagram.rnc
    │   │   ├── dml-lockedCanvas.rnc
    │   │   ├── dml-main.rnc
    │   │   ├── dml-picture.rnc
    │   │   ├── dml-spreadsheetDrawing.rnc
    │   │   ├── dml-wordprocessingDrawing.rnc
    │   │   ├── DrawingML_Chart_Drawing.rnc
    │   │   ├── DrawingML_Chart.rnc
    │   │   ├── DrawingML_Diagram_Colors.rnc
    │   │   ├── DrawingML_Diagram_Data.rnc
    │   │   ├── DrawingML_Diagram_Layout_Definition.rnc
    │   │   ├── DrawingML_Diagram_Style.rnc
    │   │   ├── DrawingML_Table_Styles.rnc
    │   │   ├── DrawingML_Theme_Override.rnc
    │   │   ├── DrawingML_Theme.rnc
    │   │   ├── pml.rnc
    │   │   ├── PresentationML_Comment_Authors.rnc
    │   │   ├── PresentationML_Comments.rnc
    │   │   ├── PresentationML_Handout_Master.rnc
    │   │   ├── PresentationML_Notes_Master.rnc
    │   │   ├── PresentationML_Notes_Slide.rnc
    │   │   ├── PresentationML_Presentation_Properties.rnc
    │   │   ├── PresentationML_Presentation.rnc
    │   │   ├── PresentationML_Slide_Layout.rnc
    │   │   ├── PresentationML_Slide_Master.rnc
    │   │   ├── PresentationML_Slide.rnc
    │   │   ├── PresentationML_Slide_Synchronization_Data.rnc
    │   │   ├── PresentationML_User-Defined_Tags.rnc
    │   │   ├── PresentationML_View_Properties.rnc
    │   │   ├── shared-additionalCharacteristics.rnc
    │   │   ├── Shared_Additional_Characteristics.rnc
    │   │   ├── shared-bibliography.rnc
    │   │   ├── Shared_Bibliography.rnc
    │   │   ├── shared-commonSimpleTypes.rnc
    │   │   ├── Shared_Custom_File_Properties.rnc
    │   │   ├── shared-customXmlDataProperties.rnc
    │   │   ├── Shared_Custom_XML_Data_Storage_Properties.rnc
    │   │   ├── shared-customXmlSchemaProperties.rnc
    │   │   ├── shared-documentPropertiesCustom.rnc
    │   │   ├── shared-documentPropertiesExtended.rnc
    │   │   ├── shared-documentPropertiesVariantTypes.rnc
    │   │   ├── Shared_Extended_File_Properties.rnc
    │   │   ├── shared-math.rnc
    │   │   ├── shared-relationshipReference.rnc
    │   │   ├── sml.rnc
    │   │   ├── SpreadsheetML_Calculation_Chain.rnc
    │   │   ├── SpreadsheetML_Chartsheet.rnc
    │   │   ├── SpreadsheetML_Comments.rnc
    │   │   ├── SpreadsheetML_Connections.rnc
    │   │   ├── SpreadsheetML_Custom_XML_Mappings.rnc
    │   │   ├── SpreadsheetML_Dialogsheet.rnc
    │   │   ├── SpreadsheetML_Drawing.rnc
    │   │   ├── SpreadsheetML_External_Workbook_References.rnc
    │   │   ├── SpreadsheetML_Metadata.rnc
    │   │   ├── SpreadsheetML_Pivot_Table_Cache_Definition.rnc
    │   │   ├── SpreadsheetML_Pivot_Table_Cache_Records.rnc
    │   │   ├── SpreadsheetML_Pivot_Table.rnc
    │   │   ├── SpreadsheetML_Query_Table.rnc
    │   │   ├── SpreadsheetML_Shared_String_Table.rnc
    │   │   ├── SpreadsheetML_Shared_Workbook_Revision_Headers.rnc
    │   │   ├── SpreadsheetML_Shared_Workbook_Revision_Log.rnc
    │   │   ├── SpreadsheetML_Shared_Workbook_User_Data.rnc
    │   │   ├── SpreadsheetML_Single_Cell_Table_Definitions.rnc
    │   │   ├── SpreadsheetML_Styles.rnc
    │   │   ├── SpreadsheetML_Table_Definitions.rnc
    │   │   ├── SpreadsheetML_Volatile_Dependencies.rnc
    │   │   ├── SpreadsheetML_Workbook.rnc
    │   │   ├── SpreadsheetML_Worksheet.rnc
    │   │   ├── VML_Drawing.rnc
    │   │   ├── vml-main.rnc
    │   │   ├── vml-officeDrawing.rnc
    │   │   ├── vml-presentationDrawing.rnc
    │   │   ├── vml-spreadsheetDrawing.rnc
    │   │   ├── vml-wordprocessingDrawing.rnc
    │   │   ├── wml.rnc
    │   │   ├── WordprocessingML_Comments.rnc
    │   │   ├── WordprocessingML_Document_Settings.rnc
    │   │   ├── WordprocessingML_Endnotes.rnc
    │   │   ├── WordprocessingML_Font_Table.rnc
    │   │   ├── WordprocessingML_Footer.rnc
    │   │   ├── WordprocessingML_Footnotes.rnc
    │   │   ├── WordprocessingML_Glossary_Document.rnc
    │   │   ├── WordprocessingML_Header.rnc
    │   │   ├── WordprocessingML_Mail_Merge_Recipient_Data.rnc
    │   │   ├── WordprocessingML_Main_Document.rnc
    │   │   ├── WordprocessingML_Numbering_Definitions.rnc
    │   │   ├── WordprocessingML_Style_Definitions.rnc
    │   │   ├── WordprocessingML_Web_Settings.rnc
    │   │   └── xml.rnc
    │   ├── styles.xml
    │   └── xsd
    │       ├── dml-chartDrawing.xsd
    │       ├── dml-chart.xsd
    │       ├── dml-diagram.xsd
    │       ├── dml-lockedCanvas.xsd
    │       ├── dml-main.xsd
    │       ├── dml-picture.xsd
    │       ├── dml-spreadsheetDrawing.xsd
    │       ├── dml-wordprocessingDrawing.xsd
    │       ├── opc-xsd
    │       │   ├── opc-contentTypes.xsd
    │       │   ├── opc-coreProperties.xsd
    │       │   ├── opc-digSig.xsd
    │       │   └── opc-relationships.xsd
    │       ├── pml.xsd
    │       ├── shared-additionalCharacteristics.xsd
    │       ├── shared-bibliography.xsd
    │       ├── shared-commonSimpleTypes.xsd
    │       ├── shared-customXmlDataProperties.xsd
    │       ├── shared-customXmlSchemaProperties.xsd
    │       ├── shared-documentPropertiesCustom.xsd
    │       ├── shared-documentPropertiesExtended.xsd
    │       ├── shared-documentPropertiesVariantTypes.xsd
    │       ├── shared-math.xsd
    │       ├── shared-relationshipReference.xsd
    │       ├── sml.xsd
    │       ├── vml-main.xsd
    │       ├── vml-officeDrawing.xsd
    │       ├── vml-presentationDrawing.xsd
    │       ├── vml-spreadsheetDrawing.xsd
    │       ├── vml-wordprocessingDrawing.xsd
    │       └── wml.xsd
    ├── requirements-dev.txt
    ├── requirements-docs.txt
    ├── requirements-test.txt
    ├── requirements.txt
    ├── src
    │   └── docx
    │       ├── api.py
    │       ├── blkcntnr.py
    │       ├── dml
    │       │   ├── color.py
    │       │   └── __init__.py
    │       ├── document.py
    │       ├── drawing
    │       │   └── __init__.py
    │       ├── enum
    │       │   ├── base.py
    │       │   ├── dml.py
    │       │   ├── __init__.py
    │       │   ├── section.py
    │       │   ├── shape.py
    │       │   ├── style.py
    │       │   ├── table.py
    │       │   └── text.py
    │       ├── exceptions.py
    │       ├── image
    │       │   ├── bmp.py
    │       │   ├── constants.py
    │       │   ├── exceptions.py
    │       │   ├── gif.py
    │       │   ├── helpers.py
    │       │   ├── image.py
    │       │   ├── __init__.py
    │       │   ├── jpeg.py
    │       │   ├── png.py
    │       │   └── tiff.py
    │       ├── __init__.py
    │       ├── opc
    │       │   ├── constants.py
    │       │   ├── coreprops.py
    │       │   ├── exceptions.py
    │       │   ├── __init__.py
    │       │   ├── oxml.py
    │       │   ├── package.py
    │       │   ├── packuri.py
    │       │   ├── part.py
    │       │   ├── parts
    │       │   │   ├── coreprops.py
    │       │   │   └── __init__.py
    │       │   ├── phys_pkg.py
    │       │   ├── pkgreader.py
    │       │   ├── pkgwriter.py
    │       │   ├── rel.py
    │       │   ├── shared.py
    │       │   └── spec.py
    │       ├── oxml
    │       │   ├── coreprops.py
    │       │   ├── document.py
    │       │   ├── drawing.py
    │       │   ├── exceptions.py
    │       │   ├── __init__.py
    │       │   ├── ns.py
    │       │   ├── numbering.py
    │       │   ├── parser.py
    │       │   ├── section.py
    │       │   ├── settings.py
    │       │   ├── shape.py
    │       │   ├── shared.py
    │       │   ├── simpletypes.py
    │       │   ├── styles.py
    │       │   ├── table.py
    │       │   ├── text
    │       │   │   ├── font.py
    │       │   │   ├── hyperlink.py
    │       │   │   ├── __init__.py
    │       │   │   ├── pagebreak.py
    │       │   │   ├── paragraph.py
    │       │   │   ├── parfmt.py
    │       │   │   └── run.py
    │       │   └── xmlchemy.py
    │       ├── package.py
    │       ├── parts
    │       │   ├── document.py
    │       │   ├── hdrftr.py
    │       │   ├── image.py
    │       │   ├── __init__.py
    │       │   ├── numbering.py
    │       │   ├── settings.py
    │       │   ├── story.py
    │       │   └── styles.py
    │       ├── py.typed
    │       ├── section.py
    │       ├── settings.py
    │       ├── shape.py
    │       ├── shared.py
    │       ├── styles
    │       │   ├── __init__.py
    │       │   ├── latent.py
    │       │   ├── style.py
    │       │   └── styles.py
    │       ├── table.py
    │       ├── templates
    │       │   ├── default.docx
    │       │   ├── default-docx-template
    │       │   │   ├── [Content_Types].xml
    │       │   │   ├── customXml
    │       │   │   │   ├── item1.xml
    │       │   │   │   ├── itemProps1.xml
    │       │   │   │   └── _rels
    │       │   │   │       └── item1.xml.rels
    │       │   │   ├── docProps
    │       │   │   │   ├── app.xml
    │       │   │   │   ├── core.xml
    │       │   │   │   └── thumbnail.jpeg
    │       │   │   ├── _rels
    │       │   │   └── word
    │       │   │       ├── document.xml
    │       │   │       ├── fontTable.xml
    │       │   │       ├── numbering.xml
    │       │   │       ├── _rels
    │       │   │       │   └── document.xml.rels
    │       │   │       ├── settings.xml
    │       │   │       ├── stylesWithEffects.xml
    │       │   │       ├── styles.xml
    │       │   │       ├── theme
    │       │   │       │   └── theme1.xml
    │       │   │       └── webSettings.xml
    │       │   ├── default-footer.xml
    │       │   ├── default-header.xml
    │       │   ├── default-settings.xml
    │       │   └── default-styles.xml
    │       ├── text
    │       │   ├── font.py
    │       │   ├── hyperlink.py
    │       │   ├── __init__.py
    │       │   ├── pagebreak.py
    │       │   ├── paragraph.py
    │       │   ├── parfmt.py
    │       │   ├── run.py
    │       │   └── tabstops.py
    │       └── types.py
    ├── tests
    │   ├── conftest.py
    │   ├── dml
    │   │   ├── __init__.py
    │   │   └── test_color.py
    │   ├── image
    │   │   ├── __init__.py
    │   │   ├── test_bmp.py
    │   │   ├── test_gif.py
    │   │   ├── test_helpers.py
    │   │   ├── test_image.py
    │   │   ├── test_jpeg.py
    │   │   ├── test_png.py
    │   │   └── test_tiff.py
    │   ├── __init__.py
    │   ├── opc
    │   │   ├── __init__.py
    │   │   ├── parts
    │   │   │   ├── __init__.py
    │   │   │   └── test_coreprops.py
    │   │   ├── test_coreprops.py
    │   │   ├── test_oxml.py
    │   │   ├── test_package.py
    │   │   ├── test_packuri.py
    │   │   ├── test_part.py
    │   │   ├── test_phys_pkg.py
    │   │   ├── test_pkgreader.py
    │   │   ├── test_pkgwriter.py
    │   │   ├── test_rel.py
    │   │   └── unitdata
    │   │       ├── __init__.py
    │   │       ├── rels.py
    │   │       └── types.py
    │   ├── oxml
    │   │   ├── __init__.py
    │   │   ├── parts
    │   │   │   ├── __init__.py
    │   │   │   ├── test_document.py
    │   │   │   └── unitdata
    │   │   │       ├── document.py
    │   │   │       └── __init__.py
    │   │   ├── test_document.py
    │   │   ├── test__init__.py
    │   │   ├── test_ns.py
    │   │   ├── test_section.py
    │   │   ├── test_styles.py
    │   │   ├── test_table.py
    │   │   ├── test_xmlchemy.py
    │   │   ├── text
    │   │   │   ├── __init__.py
    │   │   │   ├── test_hyperlink.py
    │   │   │   └── test_run.py
    │   │   └── unitdata
    │   │       ├── dml.py
    │   │       ├── __init__.py
    │   │       ├── numbering.py
    │   │       ├── section.py
    │   │       ├── shared.py
    │   │       ├── styles.py
    │   │       └── text.py
    │   ├── parts
    │   │   ├── __init__.py
    │   │   ├── test_document.py
    │   │   ├── test_hdrftr.py
    │   │   ├── test_image.py
    │   │   ├── test_numbering.py
    │   │   ├── test_settings.py
    │   │   ├── test_story.py
    │   │   └── test_styles.py
    │   ├── styles
    │   │   ├── __init__.py
    │   │   ├── test_latent.py
    │   │   ├── test_style.py
    │   │   └── test_styles.py
    │   ├── test_api.py
    │   ├── test_blkcntnr.py
    │   ├── test_document.py
    │   ├── test_enum.py
    │   ├── test_files
    │   │   ├── 150-dpi.png
    │   │   ├── 300-dpi.jpg
    │   │   ├── 300-dpi.png
    │   │   ├── 300-dpi.TIF
    │   │   ├── 72-dpi.tiff
    │   │   ├── blk-inner-content.docx
    │   │   ├── CVS_LOGO.WMF
    │   │   ├── exif-420-dpi.jpg
    │   │   ├── expanded_docx
    │   │   │   ├── [Content_Types].xml
    │   │   │   ├── customXml
    │   │   │   │   ├── item1.xml
    │   │   │   │   ├── itemProps1.xml
    │   │   │   │   └── _rels
    │   │   │   │       └── item1.xml.rels
    │   │   │   ├── docProps
    │   │   │   │   ├── app.xml
    │   │   │   │   ├── core.xml
    │   │   │   │   └── thumbnail.jpeg
    │   │   │   ├── _rels
    │   │   │   └── word
    │   │   │       ├── document.xml
    │   │   │       ├── fontTable.xml
    │   │   │       ├── numbering.xml
    │   │   │       ├── _rels
    │   │   │       │   └── document.xml.rels
    │   │   │       ├── settings.xml
    │   │   │       ├── stylesWithEffects.xml
    │   │   │       ├── styles.xml
    │   │   │       ├── theme
    │   │   │       │   └── theme1.xml
    │   │   │       └── webSettings.xml
    │   │   ├── having-images.docx
    │   │   ├── jfif-iguana.jpg
    │   │   ├── little-endian.tif
    │   │   ├── monty-truth.png
    │   │   ├── python.bmp
    │   │   ├── python-icon.jpeg
    │   │   ├── python-icon.png
    │   │   ├── python-powered.png
    │   │   ├── sct-inner-content.docx
    │   │   ├── snippets
    │   │   │   ├── add-row-col.txt
    │   │   │   ├── inline.txt
    │   │   │   ├── new-tbl.txt
    │   │   │   └── tbl-cells.txt
    │   │   ├── sonic.gif
    │   │   └── test.docx
    │   ├── test_package.py
    │   ├── test_section.py
    │   ├── test_settings.py
    │   ├── test_shape.py
    │   ├── test_shared.py
    │   ├── test_table.py
    │   ├── text
    │   │   ├── __init__.py
    │   │   ├── test_font.py
    │   │   ├── test_hyperlink.py
    │   │   ├── test_pagebreak.py
    │   │   ├── test_paragraph.py
    │   │   ├── test_parfmt.py
    │   │   ├── test_run.py
    │   │   └── test_tabstops.py
    │   ├── unitdata.py
    │   └── unitutil
    │       ├── cxml.py
    │       ├── file.py
    │       ├── __init__.py
    │       └── mock.py
    ├── tox.ini
    └── typings
        └── behave
            ├── __init__.pyi
            └── runner.pyi

75 directories, 598 files

标签:

实例下载地址

使用Python创建和修改Word文档

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警