FreeWork


NameFreeWork JSON
Version 0.1.10 PyPI version JSON
download
home_pageNone
Summary简单又实用的office操作函数!(Simple and practical office operation functions!)
upload_time2024-04-08 13:10:59
maintainerNone
docs_urlNone
authorJhonie King(王骏诚)
requires_pythonNone
licenseMIT License
keywords python office excle word file's operation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **★ 关于FreeWork的相关介绍 (Introduction for FreeWork)★**

*本文档为中英双语文档,其中括号内的为中文部分的英语译文,其二者内容相同。(This document is a bilingual document in Chinese and English, with the English translation of the Chinese part enclosed in parentheses, both of which have the same content.)*

**函数目录 (List of Function)**

**· 文件复制函数/File Copy Function:**
CopyFile(FileOriginalPath, FileNewPath)

**· 文件剪切函数/File Move Function:**
MoveFile(FileOriginalPath, FileNewPath)

**· Excle读取函数/Excel Read Function:**
ExcleRead(ExclePath, SheetIndex, Rowlow, Rowmax, Collow, Colmax)

**· Excle写入函数/Excel Write Function:**
ExcleWrite(ExclePath, SheetIndex, CellRow, CellCol, Value, SaveAsNewFile(True / False))

**· Word表格读取函数/Word Table Reading Function:**
WordTableRead(WordPath, TableIndex)

**· Word表格写入函数/Word Table Writing Function:**
WordTableWrite(WordPath, TableIndex, Row, Col, InputText, SaveAsNewFile(True / False))

**· Word表格追加图片函数(不删除原有文字)/Word Table Append Image Function (Doesn't delete original text):**
WordTableInsertFig(WordPath, TableIndex, Row, Col, ImagePath, ImageHeight_cm, ImageWidth_cm, SaveAsNewFile)

**· Word表格单元格对齐设置函数/Word Table Cell Alignment Setting Function:**
WordTableParaAlignment(WordPath, TableIndex, Row, Col, Alignment_left_right_center_None, SaveAsNewFile)

**· Word写入函数/Word Write Function:**
wordParagraphAdd(wordPath, wordSavePath, new_text, FontName, FontSize, IsBold, IsItalic):

**· Word新段写入函数/Word Write Paragraph Function:**
wordAdd(wordPath, wordSavePath, new_text, FontName, FontSize, IsBold, IsItalic, Indent)

**· Shapefile转出Excle函数/Shapefile Exporting Excel Function:**
ShpToXlsx(ShpPath, XlsxPath)

**· Word段落格式获取函数/Word Paragraph Format Get Function:**
wordParaFormat(wordPath)


**一、安装 (Installation)**

.. code:: python

    pip install FreeWork

**二、使用 (Usage)**

**1. 导包 (Import)**

.. code:: python

    from FreeWork import OfficeWork as ow

**2. 内置函数 (Integrated functions)**

**(1) 文件复制函数 (File Copy Function)**

本函数用于复制文件,在复制的同时可以根据需求修改函数名字。通常与for循环结合进行批量复制并改名的操作。(This function is used to copy files, and the function name can be modified as needed while copying. Usually combined with the for loop for batch copying and renaming operations.)

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.CopyFile(FileOriginalPath, FileNewPath)
    # ow.CopyFile(文件原始路径, 文件新路径)

*注意,这里文件路径为包含文件名的路径,可以是相对路径,也可以是绝对路径。如:(1)D:\Example\EasyWork\example.png;(2)\Example\example.png。*

*(Note that the file path here is a path that includes the file name, which can be a relative path or an absolute path. For example:(1)D:\Example\EasyWork\example.png;(2)\Example\example.png)*

**(2) 文件剪切函数 (File Move Function)**

本函数用于剪切文件,在剪切的同时可以根据需求修改函数名字。通常与for循环结合进行批量剪切并改名的操作。(This function is used to move files, and the function name can be modified as needed while moving. Usually combined with the for loop for batch move and renaming operations.)

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.MoveFile(FileOriginalPath, FileNewPath)
    # ow.MoveFile(文件原始路径, 文件新路径)

*注意,这里文件路径为包含文件名的路径,可以是相对路径,也可以是绝对路径。如:(1)D:\Example\EasyWork\example.jpg;(2)\Example\example.jpg。*

*(Note that the file path here is a path that includes the file name, which can be a relative path or an absolute path. For example:(1)D:\Example\EasyWork\example.jpg;(2)\Example\example.jpg)*

**(3) Excle读取函数 (Excel Read Function)**

.. code:: python

    from FreeWork import OfficeWork as ow

    List = ow.ExcleRead(ExclePath, SheetIndex, Rowlow, Rowmax, Collow, Colmax)
    # ow.ExcleRead(Excle路径, Sheet序号, 最小行号, 最大行号, 最小列号, 最大列号)

*注意,这里所有的序号均是从1开始而不是0!而且列号为数字,请不要填写字母。文件路径同样为包含文件名的路径,可以是相对路径,也可以是绝对路径,与前面的函数所需的路径形式相同。(Note that all serial numbers here start from 1 instead of 0! And the column number is a number, please do not fill in letters.The file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*

比如我需要获取example.xlsx中sheet1的(2,3)到(5,7)的所有数据,则应当如下调用:

(For example, if I need to retrieve all the data from (2,3) to (5,7) of Sheet1 in example.xlsx, I should call as follows:)

.. code:: python

    from FreeWork import OfficeWork as ow

    List = ow.ExcleRead("\Example\example.xlsx", 1, 2, 5, 3, 7)

**(4) Excle写入函数 (Excel Write Function)**

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.ExcleWrite(ExclePath, SheetIndex, CellRow, CellCol, Value, SaveAsNewFile(True / False))
    # ow.ExcleWrite(Excle路径, Sheet序号, 单元格行号, 单元格列号, 要赋的值, 是否保存为新文件(True/False))

*注意,这里所有的序号均是从1开始而不是0!而且列号为数字,请不要填写字母。文件路径同样为包含文件名的路径,可以是相对路径,也可以是绝对路径,与前面的函数所需的路径形式相同。(Note that all serial numbers here start from 1 instead of 0! And the column number is a number, please do not fill in letters.The file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*

本函数只能填写单个单元格,若需批量填写,可与for循环等结合使用。(This function can only fill in a single cell. If batch filling is required, it can be used in conjunction with for loops, etc.)

**(5) Word表格读取函数 (Word Table Reading Function)**

.. code:: python

    from FreeWork import OfficeWork as ow

    List = ow.WordTableRead(WordPath, TableIndex)
    # ow.WordTableRead(Word路径, 表格索引)

*注意,这里表格索引为全局索引。文件路径同样为包含文件名的路径,可以是相对路径,也可以是绝对路径,与前面的函数所需的路径形式相同。(Note that the table index here is a global index. The file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*

**(6) Word表格写入函数 (Word Table Writing Function)**

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.WordTableWrite(WordPath, TableIndex, Row, Col, InputText, SaveAsNewFile(True / False))
    # ow.WordTableWrite(Word路径, 表格索引, 行号, 列号, 欲写入的文本, 是否保存为新文件(True/False))

*注意,这里行号与Excle的不同,加入表格1的未合并前为6个单元格,此时将1、2单元格合并。此时“行号”参数填写1与2均会写入第一个单元格,当填入3时才会写入第二个单元格。列与行的情况相同。(Note that the row numbers here are different from Excel. Before joining Table 1, there are 6 unmerged cells. In this case, cells 1 and 2 will be merged. At this point, filling in 1 and 2 for the "line number" parameter will be written to the first cell, and only when filling in 3 will it be written to the second cell. The situation is the same for columns and rows.)*

**· 如果想要插入如下的上标下标 (If you want to insert the following superscript and subscript)**

.. math::

    面积 S_1=123 hm^2

它的代码应该如下所示 (Its code should look like this):

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.WordTableWrite(WordPath, TableIndex, Row, Col, "面积 S_(1)=123 hm^(2)", SaveAsNewFile(True / False))
    # ow.WordTableWrite(Word路径, 表格索引, 行号, 列号, 欲写入的文本, 是否保存为新文件(True/False))

*其中括号是必不可少的,否则“^”符号后面的所有文本均将以上标的形式写入段落,“_”符号后面的所有文本均将以下标的形式写入段落,直至本条插入文本结束!还有请注意,这里括号需以英文状态下输入,否则将不会起到其应有的作用。(Parentheses are essential, if there are no parentheses, all text after the "^" symbol will be written to the paragraph in the above form, and all text after the "_" symbol will be written to the paragraph in the following form until the end of the inserted text in this article! Also, please note that the parentheses need to be entered in English, otherwise they will not play their proper role.)*

**(7) Word表格追加图片函数/不删除原有文字 (Word Table Append Image Function / Doesn't delete original text)**

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.WordTableInsertFig(WordPath, TableIndex, Row, Col, ImagePath, ImageHeight_cm, ImageWidth_cm, SaveAsNewFile)
    # ow.WordTableInsertFig(Word路径, 表格索引, 行号, 列号, 图片路径, 插入后图片的高度(厘米为单位), 插入后图片的宽度(厘米为单位), 是否保存为新文件(True/False))

*注意,这里图片高度可以为“None”,行号列号规则与函数(6)相同。(Note that the height of the image here can be "None", and the row and column numbering rules are the same as function (6).)*

**(8) Word表格单元格对齐设置函数 (Word Table Cell Alignment Setting Function)**

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.WordTableParaAlignment(WordPath, TableIndex, Row, Col, Alignment_left_right_center_None, SaveAsNewFile)
    # ow.WordTableParaAlignment(Word路径, 表格索引, 行号, 列号, 对齐方式, 是否保存为新文件(True/False))

*注意,对齐方式只能填写left/right/center/None,否则均会设置为None两端对齐。(Note that the alignment method can only be left/right/center/None, otherwise it will be set to None for both ends alignment.)*

**(9) Shapefile转出Excle函数 (Shapefile Exporting Excel Function)**

.. code:: python

    from FreeWork import OfficeWork as ow

    ow.ShpToXlsx(ShpPath, XlsxPath)
    # ow.ShpToXlsx(Shp路径, Xlsx路径)

*注意,文件路径同样为包含文件名的路径,可以是相对路径,也可以是绝对路径,与前面的函数所需的路径形式相同。(Note that the file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*

**三、反馈与改进 (Feedback and improvement)**

本程序包将继续完善,在第二个版本上架时将会发布CSND的解析与教程,后续还会发布Bilibili的视频教程。若在此期间遇到任何问题,欢迎与作者联系。
(This package will continue to be improved, and CSND parsing and tutorials will be released when the second version is launched. Bilibili video tutorials will also be released in the future. If you encounter any problems during this period, please feel free to contact the author.)

中国大陆的朋友可以通过QQ或邮箱的形式与作者取得联系,
中国台湾、中国香港、中国澳门以及海外的朋友欢迎通过邮件的形式与作者交流,
作者收到反馈消息后将第一时间进行反馈!
(Friends in Chinese Mainland can contact the author via QQ or email. Friends in China Taiwan, China Hong Kong, China Macao and overseas are welcome to communicate with the author via email. The author will give feedback as soon as he receives the feedback!)

**称呼:**
王先生 (
**Name:**
Jhonie)

**E-mail:**
queenelsaofarendelle2022@gmail.com / 2570518164@qq.com

**QQ:**
2570518164

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "FreeWork",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, Office, Excle, Word, File's operation",
    "author": "Jhonie King(\u738b\u9a8f\u8bda)",
    "author_email": "queenelsaofarendelle2022@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1f/0d/2a75a29fdcb582ad41d0d535839330b346127f9d827e43e0d8dc8a6b310d/FreeWork-0.1.10.zip",
    "platform": null,
    "description": "**\u2605 \u5173\u4e8eFreeWork\u7684\u76f8\u5173\u4ecb\u7ecd (Introduction for FreeWork)\u2605**\r\n\r\n*\u672c\u6587\u6863\u4e3a\u4e2d\u82f1\u53cc\u8bed\u6587\u6863\uff0c\u5176\u4e2d\u62ec\u53f7\u5185\u7684\u4e3a\u4e2d\u6587\u90e8\u5206\u7684\u82f1\u8bed\u8bd1\u6587\uff0c\u5176\u4e8c\u8005\u5185\u5bb9\u76f8\u540c\u3002(This document is a bilingual document in Chinese and English, with the English translation of the Chinese part enclosed in parentheses, both of which have the same content.)*\r\n\r\n**\u51fd\u6570\u76ee\u5f55 (List of Function)**\r\n\r\n**\u00b7 \u6587\u4ef6\u590d\u5236\u51fd\u6570/File Copy Function\uff1a**\r\nCopyFile(FileOriginalPath, FileNewPath)\r\n\r\n**\u00b7 \u6587\u4ef6\u526a\u5207\u51fd\u6570/File Move Function\uff1a**\r\nMoveFile(FileOriginalPath, FileNewPath)\r\n\r\n**\u00b7 Excle\u8bfb\u53d6\u51fd\u6570/Excel Read Function\uff1a**\r\nExcleRead(ExclePath, SheetIndex, Rowlow, Rowmax, Collow, Colmax)\r\n\r\n**\u00b7 Excle\u5199\u5165\u51fd\u6570/Excel Write Function\uff1a**\r\nExcleWrite(ExclePath, SheetIndex, CellRow, CellCol, Value, SaveAsNewFile(True / False))\r\n\r\n**\u00b7 Word\u8868\u683c\u8bfb\u53d6\u51fd\u6570/Word Table Reading Function\uff1a**\r\nWordTableRead(WordPath, TableIndex)\r\n\r\n**\u00b7 Word\u8868\u683c\u5199\u5165\u51fd\u6570/Word Table Writing Function\uff1a**\r\nWordTableWrite(WordPath, TableIndex, Row, Col, InputText, SaveAsNewFile(True / False))\r\n\r\n**\u00b7 Word\u8868\u683c\u8ffd\u52a0\u56fe\u7247\u51fd\u6570\uff08\u4e0d\u5220\u9664\u539f\u6709\u6587\u5b57\uff09/Word Table Append Image Function (Doesn't delete original text)\uff1a**\r\nWordTableInsertFig(WordPath, TableIndex, Row, Col, ImagePath, ImageHeight_cm, ImageWidth_cm, SaveAsNewFile)\r\n\r\n**\u00b7 Word\u8868\u683c\u5355\u5143\u683c\u5bf9\u9f50\u8bbe\u7f6e\u51fd\u6570/Word Table Cell Alignment Setting Function\uff1a**\r\nWordTableParaAlignment(WordPath, TableIndex, Row, Col, Alignment_left_right_center_None, SaveAsNewFile)\r\n\r\n**\u00b7 Word\u5199\u5165\u51fd\u6570/Word Write Function\uff1a**\r\nwordParagraphAdd(wordPath, wordSavePath, new_text, FontName, FontSize, IsBold, IsItalic):\r\n\r\n**\u00b7 Word\u65b0\u6bb5\u5199\u5165\u51fd\u6570/Word Write Paragraph Function\uff1a**\r\nwordAdd(wordPath, wordSavePath, new_text, FontName, FontSize, IsBold, IsItalic, Indent)\r\n\r\n**\u00b7 Shapefile\u8f6c\u51faExcle\u51fd\u6570/Shapefile Exporting Excel Function\uff1a**\r\nShpToXlsx(ShpPath, XlsxPath)\r\n\r\n**\u00b7 Word\u6bb5\u843d\u683c\u5f0f\u83b7\u53d6\u51fd\u6570/Word Paragraph Format Get Function\uff1a**\r\nwordParaFormat(wordPath)\r\n\r\n\r\n**\u4e00\u3001\u5b89\u88c5 (Installation)**\r\n\r\n.. code:: python\r\n\r\n    pip install FreeWork\r\n\r\n**\u4e8c\u3001\u4f7f\u7528 (Usage)**\r\n\r\n**1. \u5bfc\u5305 (Import)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n**2. \u5185\u7f6e\u51fd\u6570 (Integrated functions)**\r\n\r\n**(1) \u6587\u4ef6\u590d\u5236\u51fd\u6570 (File Copy Function)**\r\n\r\n\u672c\u51fd\u6570\u7528\u4e8e\u590d\u5236\u6587\u4ef6\uff0c\u5728\u590d\u5236\u7684\u540c\u65f6\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u4fee\u6539\u51fd\u6570\u540d\u5b57\u3002\u901a\u5e38\u4e0efor\u5faa\u73af\u7ed3\u5408\u8fdb\u884c\u6279\u91cf\u590d\u5236\u5e76\u6539\u540d\u7684\u64cd\u4f5c\u3002(This function is used to copy files, and the function name can be modified as needed while copying. Usually combined with the for loop for batch copying and renaming operations.)\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.CopyFile(FileOriginalPath, FileNewPath)\r\n    # ow.CopyFile(\u6587\u4ef6\u539f\u59cb\u8def\u5f84, \u6587\u4ef6\u65b0\u8def\u5f84)\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u6587\u4ef6\u8def\u5f84\u4e3a\u5305\u542b\u6587\u4ef6\u540d\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\u3002\u5982\uff1a(1)D:\\Example\\EasyWork\\example.png;(2)\\Example\\example.png\u3002*\r\n\r\n*(Note that the file path here is a path that includes the file name, which can be a relative path or an absolute path. For example:(1)D:\\Example\\EasyWork\\example.png;(2)\\Example\\example.png)*\r\n\r\n**(2) \u6587\u4ef6\u526a\u5207\u51fd\u6570 (File Move Function)**\r\n\r\n\u672c\u51fd\u6570\u7528\u4e8e\u526a\u5207\u6587\u4ef6\uff0c\u5728\u526a\u5207\u7684\u540c\u65f6\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u4fee\u6539\u51fd\u6570\u540d\u5b57\u3002\u901a\u5e38\u4e0efor\u5faa\u73af\u7ed3\u5408\u8fdb\u884c\u6279\u91cf\u526a\u5207\u5e76\u6539\u540d\u7684\u64cd\u4f5c\u3002(This function is used to move files, and the function name can be modified as needed while moving. Usually combined with the for loop for batch move and renaming operations.)\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.MoveFile(FileOriginalPath, FileNewPath)\r\n    # ow.MoveFile(\u6587\u4ef6\u539f\u59cb\u8def\u5f84, \u6587\u4ef6\u65b0\u8def\u5f84)\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u6587\u4ef6\u8def\u5f84\u4e3a\u5305\u542b\u6587\u4ef6\u540d\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\u3002\u5982\uff1a(1)D:\\Example\\EasyWork\\example.jpg;(2)\\Example\\example.jpg\u3002*\r\n\r\n*(Note that the file path here is a path that includes the file name, which can be a relative path or an absolute path. For example:(1)D:\\Example\\EasyWork\\example.jpg;(2)\\Example\\example.jpg)*\r\n\r\n**(3) Excle\u8bfb\u53d6\u51fd\u6570 (Excel Read Function)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    List = ow.ExcleRead(ExclePath, SheetIndex, Rowlow, Rowmax, Collow, Colmax)\r\n    # ow.ExcleRead(Excle\u8def\u5f84, Sheet\u5e8f\u53f7, \u6700\u5c0f\u884c\u53f7, \u6700\u5927\u884c\u53f7, \u6700\u5c0f\u5217\u53f7, \u6700\u5927\u5217\u53f7)\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u6240\u6709\u7684\u5e8f\u53f7\u5747\u662f\u4ece1\u5f00\u59cb\u800c\u4e0d\u662f0\uff01\u800c\u4e14\u5217\u53f7\u4e3a\u6570\u5b57\uff0c\u8bf7\u4e0d\u8981\u586b\u5199\u5b57\u6bcd\u3002\u6587\u4ef6\u8def\u5f84\u540c\u6837\u4e3a\u5305\u542b\u6587\u4ef6\u540d\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\uff0c\u4e0e\u524d\u9762\u7684\u51fd\u6570\u6240\u9700\u7684\u8def\u5f84\u5f62\u5f0f\u76f8\u540c\u3002(Note that all serial numbers here start from 1 instead of 0! And the column number is a number, please do not fill in letters.The file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*\r\n\r\n\u6bd4\u5982\u6211\u9700\u8981\u83b7\u53d6example.xlsx\u4e2dsheet1\u7684(2,3)\u5230(5,7)\u7684\u6240\u6709\u6570\u636e\uff0c\u5219\u5e94\u5f53\u5982\u4e0b\u8c03\u7528\uff1a\r\n\r\n(For example, if I need to retrieve all the data from (2,3) to (5,7) of Sheet1 in example.xlsx, I should call as follows:)\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    List = ow.ExcleRead(\"\\Example\\example.xlsx\", 1, 2, 5, 3, 7)\r\n\r\n**(4) Excle\u5199\u5165\u51fd\u6570 (Excel Write Function)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.ExcleWrite(ExclePath, SheetIndex, CellRow, CellCol, Value, SaveAsNewFile(True / False))\r\n    # ow.ExcleWrite(Excle\u8def\u5f84, Sheet\u5e8f\u53f7, \u5355\u5143\u683c\u884c\u53f7, \u5355\u5143\u683c\u5217\u53f7, \u8981\u8d4b\u7684\u503c, \u662f\u5426\u4fdd\u5b58\u4e3a\u65b0\u6587\u4ef6(True/False))\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u6240\u6709\u7684\u5e8f\u53f7\u5747\u662f\u4ece1\u5f00\u59cb\u800c\u4e0d\u662f0\uff01\u800c\u4e14\u5217\u53f7\u4e3a\u6570\u5b57\uff0c\u8bf7\u4e0d\u8981\u586b\u5199\u5b57\u6bcd\u3002\u6587\u4ef6\u8def\u5f84\u540c\u6837\u4e3a\u5305\u542b\u6587\u4ef6\u540d\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\uff0c\u4e0e\u524d\u9762\u7684\u51fd\u6570\u6240\u9700\u7684\u8def\u5f84\u5f62\u5f0f\u76f8\u540c\u3002(Note that all serial numbers here start from 1 instead of 0! And the column number is a number, please do not fill in letters.The file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*\r\n\r\n\u672c\u51fd\u6570\u53ea\u80fd\u586b\u5199\u5355\u4e2a\u5355\u5143\u683c\uff0c\u82e5\u9700\u6279\u91cf\u586b\u5199\uff0c\u53ef\u4e0efor\u5faa\u73af\u7b49\u7ed3\u5408\u4f7f\u7528\u3002(This function can only fill in a single cell. If batch filling is required, it can be used in conjunction with for loops, etc.)\r\n\r\n**(5) Word\u8868\u683c\u8bfb\u53d6\u51fd\u6570 (Word Table Reading Function)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    List = ow.WordTableRead(WordPath, TableIndex)\r\n    # ow.WordTableRead(Word\u8def\u5f84, \u8868\u683c\u7d22\u5f15)\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u8868\u683c\u7d22\u5f15\u4e3a\u5168\u5c40\u7d22\u5f15\u3002\u6587\u4ef6\u8def\u5f84\u540c\u6837\u4e3a\u5305\u542b\u6587\u4ef6\u540d\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\uff0c\u4e0e\u524d\u9762\u7684\u51fd\u6570\u6240\u9700\u7684\u8def\u5f84\u5f62\u5f0f\u76f8\u540c\u3002(Note that the table index here is a global index. The file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*\r\n\r\n**(6) Word\u8868\u683c\u5199\u5165\u51fd\u6570 (Word Table Writing Function)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.WordTableWrite(WordPath, TableIndex, Row, Col, InputText, SaveAsNewFile(True / False))\r\n    # ow.WordTableWrite(Word\u8def\u5f84, \u8868\u683c\u7d22\u5f15, \u884c\u53f7, \u5217\u53f7, \u6b32\u5199\u5165\u7684\u6587\u672c, \u662f\u5426\u4fdd\u5b58\u4e3a\u65b0\u6587\u4ef6(True/False))\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u884c\u53f7\u4e0eExcle\u7684\u4e0d\u540c\uff0c\u52a0\u5165\u8868\u683c1\u7684\u672a\u5408\u5e76\u524d\u4e3a6\u4e2a\u5355\u5143\u683c\uff0c\u6b64\u65f6\u5c061\u30012\u5355\u5143\u683c\u5408\u5e76\u3002\u6b64\u65f6\u201c\u884c\u53f7\u201d\u53c2\u6570\u586b\u51991\u4e0e2\u5747\u4f1a\u5199\u5165\u7b2c\u4e00\u4e2a\u5355\u5143\u683c\uff0c\u5f53\u586b\u51653\u65f6\u624d\u4f1a\u5199\u5165\u7b2c\u4e8c\u4e2a\u5355\u5143\u683c\u3002\u5217\u4e0e\u884c\u7684\u60c5\u51b5\u76f8\u540c\u3002(Note that the row numbers here are different from Excel. Before joining Table 1, there are 6 unmerged cells. In this case, cells 1 and 2 will be merged. At this point, filling in 1 and 2 for the \"line number\" parameter will be written to the first cell, and only when filling in 3 will it be written to the second cell. The situation is the same for columns and rows.)*\r\n\r\n**\u00b7 \u5982\u679c\u60f3\u8981\u63d2\u5165\u5982\u4e0b\u7684\u4e0a\u6807\u4e0b\u6807 (If you want to insert the following superscript and subscript)**\r\n\r\n.. math::\r\n\r\n    \u9762\u79ef S_1=123 hm^2\r\n\r\n\u5b83\u7684\u4ee3\u7801\u5e94\u8be5\u5982\u4e0b\u6240\u793a (Its code should look like this)\uff1a\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.WordTableWrite(WordPath, TableIndex, Row, Col, \"\u9762\u79ef S_(1)=123 hm^(2)\", SaveAsNewFile(True / False))\r\n    # ow.WordTableWrite(Word\u8def\u5f84, \u8868\u683c\u7d22\u5f15, \u884c\u53f7, \u5217\u53f7, \u6b32\u5199\u5165\u7684\u6587\u672c, \u662f\u5426\u4fdd\u5b58\u4e3a\u65b0\u6587\u4ef6(True/False))\r\n\r\n*\u5176\u4e2d\u62ec\u53f7\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\uff0c\u5426\u5219\u201c^\u201d\u7b26\u53f7\u540e\u9762\u7684\u6240\u6709\u6587\u672c\u5747\u5c06\u4ee5\u4e0a\u6807\u7684\u5f62\u5f0f\u5199\u5165\u6bb5\u843d\uff0c\u201c_\u201d\u7b26\u53f7\u540e\u9762\u7684\u6240\u6709\u6587\u672c\u5747\u5c06\u4ee5\u4e0b\u6807\u7684\u5f62\u5f0f\u5199\u5165\u6bb5\u843d\uff0c\u76f4\u81f3\u672c\u6761\u63d2\u5165\u6587\u672c\u7ed3\u675f\uff01\u8fd8\u6709\u8bf7\u6ce8\u610f\uff0c\u8fd9\u91cc\u62ec\u53f7\u9700\u4ee5\u82f1\u6587\u72b6\u6001\u4e0b\u8f93\u5165\uff0c\u5426\u5219\u5c06\u4e0d\u4f1a\u8d77\u5230\u5176\u5e94\u6709\u7684\u4f5c\u7528\u3002(Parentheses are essential, if there are no parentheses, all text after the \"^\" symbol will be written to the paragraph in the above form, and all text after the \"_\" symbol will be written to the paragraph in the following form until the end of the inserted text in this article! Also, please note that the parentheses need to be entered in English, otherwise they will not play their proper role.)*\r\n\r\n**(7) Word\u8868\u683c\u8ffd\u52a0\u56fe\u7247\u51fd\u6570/\u4e0d\u5220\u9664\u539f\u6709\u6587\u5b57 (Word Table Append Image Function / Doesn't delete original text)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.WordTableInsertFig(WordPath, TableIndex, Row, Col, ImagePath, ImageHeight_cm, ImageWidth_cm, SaveAsNewFile)\r\n    # ow.WordTableInsertFig(Word\u8def\u5f84, \u8868\u683c\u7d22\u5f15, \u884c\u53f7, \u5217\u53f7, \u56fe\u7247\u8def\u5f84, \u63d2\u5165\u540e\u56fe\u7247\u7684\u9ad8\u5ea6\uff08\u5398\u7c73\u4e3a\u5355\u4f4d\uff09, \u63d2\u5165\u540e\u56fe\u7247\u7684\u5bbd\u5ea6\uff08\u5398\u7c73\u4e3a\u5355\u4f4d\uff09, \u662f\u5426\u4fdd\u5b58\u4e3a\u65b0\u6587\u4ef6(True/False))\r\n\r\n*\u6ce8\u610f\uff0c\u8fd9\u91cc\u56fe\u7247\u9ad8\u5ea6\u53ef\u4ee5\u4e3a\u201cNone\u201d\uff0c\u884c\u53f7\u5217\u53f7\u89c4\u5219\u4e0e\u51fd\u6570(6)\u76f8\u540c\u3002(Note that the height of the image here can be \"None\", and the row and column numbering rules are the same as function (6).)*\r\n\r\n**(8) Word\u8868\u683c\u5355\u5143\u683c\u5bf9\u9f50\u8bbe\u7f6e\u51fd\u6570 (Word Table Cell Alignment Setting Function)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.WordTableParaAlignment(WordPath, TableIndex, Row, Col, Alignment_left_right_center_None, SaveAsNewFile)\r\n    # ow.WordTableParaAlignment(Word\u8def\u5f84, \u8868\u683c\u7d22\u5f15, \u884c\u53f7, \u5217\u53f7, \u5bf9\u9f50\u65b9\u5f0f, \u662f\u5426\u4fdd\u5b58\u4e3a\u65b0\u6587\u4ef6(True/False))\r\n\r\n*\u6ce8\u610f\uff0c\u5bf9\u9f50\u65b9\u5f0f\u53ea\u80fd\u586b\u5199left/right/center/None\uff0c\u5426\u5219\u5747\u4f1a\u8bbe\u7f6e\u4e3aNone\u4e24\u7aef\u5bf9\u9f50\u3002(Note that the alignment method can only be left/right/center/None, otherwise it will be set to None for both ends alignment.)*\r\n\r\n**(9) Shapefile\u8f6c\u51faExcle\u51fd\u6570 (Shapefile Exporting Excel Function)**\r\n\r\n.. code:: python\r\n\r\n    from FreeWork import OfficeWork as ow\r\n\r\n    ow.ShpToXlsx(ShpPath, XlsxPath)\r\n    # ow.ShpToXlsx(Shp\u8def\u5f84, Xlsx\u8def\u5f84)\r\n\r\n*\u6ce8\u610f\uff0c\u6587\u4ef6\u8def\u5f84\u540c\u6837\u4e3a\u5305\u542b\u6587\u4ef6\u540d\u7684\u8def\u5f84\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\uff0c\u4e0e\u524d\u9762\u7684\u51fd\u6570\u6240\u9700\u7684\u8def\u5f84\u5f62\u5f0f\u76f8\u540c\u3002(Note that the file path is also a path that includes the file name, which can be a relative path or an absolute path, in the same form as the path required by the previous function.)*\r\n\r\n**\u4e09\u3001\u53cd\u9988\u4e0e\u6539\u8fdb (Feedback and improvement)**\r\n\r\n\u672c\u7a0b\u5e8f\u5305\u5c06\u7ee7\u7eed\u5b8c\u5584\uff0c\u5728\u7b2c\u4e8c\u4e2a\u7248\u672c\u4e0a\u67b6\u65f6\u5c06\u4f1a\u53d1\u5e03CSND\u7684\u89e3\u6790\u4e0e\u6559\u7a0b\uff0c\u540e\u7eed\u8fd8\u4f1a\u53d1\u5e03Bilibili\u7684\u89c6\u9891\u6559\u7a0b\u3002\u82e5\u5728\u6b64\u671f\u95f4\u9047\u5230\u4efb\u4f55\u95ee\u9898\uff0c\u6b22\u8fce\u4e0e\u4f5c\u8005\u8054\u7cfb\u3002\r\n(This package will continue to be improved, and CSND parsing and tutorials will be released when the second version is launched. Bilibili video tutorials will also be released in the future. If you encounter any problems during this period, please feel free to contact the author.)\r\n\r\n\u4e2d\u56fd\u5927\u9646\u7684\u670b\u53cb\u53ef\u4ee5\u901a\u8fc7QQ\u6216\u90ae\u7bb1\u7684\u5f62\u5f0f\u4e0e\u4f5c\u8005\u53d6\u5f97\u8054\u7cfb\uff0c\r\n\u4e2d\u56fd\u53f0\u6e7e\u3001\u4e2d\u56fd\u9999\u6e2f\u3001\u4e2d\u56fd\u6fb3\u95e8\u4ee5\u53ca\u6d77\u5916\u7684\u670b\u53cb\u6b22\u8fce\u901a\u8fc7\u90ae\u4ef6\u7684\u5f62\u5f0f\u4e0e\u4f5c\u8005\u4ea4\u6d41\uff0c\r\n\u4f5c\u8005\u6536\u5230\u53cd\u9988\u6d88\u606f\u540e\u5c06\u7b2c\u4e00\u65f6\u95f4\u8fdb\u884c\u53cd\u9988\uff01\r\n(Friends in Chinese Mainland can contact the author via QQ or email. Friends in China Taiwan, China Hong Kong, China Macao and overseas are welcome to communicate with the author via email. The author will give feedback as soon as he receives the feedback!)\r\n\r\n**\u79f0\u547c\uff1a**\r\n\u738b\u5148\u751f (\r\n**Name:**\r\nJhonie)\r\n\r\n**E-mail\uff1a**\r\nqueenelsaofarendelle2022@gmail.com / 2570518164@qq.com\r\n\r\n**QQ\uff1a**\r\n2570518164\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "\u7b80\u5355\u53c8\u5b9e\u7528\u7684office\u64cd\u4f5c\u51fd\u6570\uff01(Simple and practical office operation functions!)",
    "version": "0.1.10",
    "project_urls": null,
    "split_keywords": [
        "python",
        " office",
        " excle",
        " word",
        " file's operation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f0d2a75a29fdcb582ad41d0d535839330b346127f9d827e43e0d8dc8a6b310d",
                "md5": "d8584961f5eb2e8136d61a4ed09ed744",
                "sha256": "b9d34e6d877306b67bf8e43a0a79025b37d3c911ab0a9f29ca0332f97123eb78"
            },
            "downloads": -1,
            "filename": "FreeWork-0.1.10.zip",
            "has_sig": false,
            "md5_digest": "d8584961f5eb2e8136d61a4ed09ed744",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19583,
            "upload_time": "2024-04-08T13:10:59",
            "upload_time_iso_8601": "2024-04-08T13:10:59.869523Z",
            "url": "https://files.pythonhosted.org/packages/1f/0d/2a75a29fdcb582ad41d0d535839330b346127f9d827e43e0d8dc8a6b310d/FreeWork-0.1.10.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-08 13:10:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "freework"
}
        
Elapsed time: 0.66941s