中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

上海網(wǎng)站公司電話(huà)seo推廣是什么意思

上海網(wǎng)站公司電話(huà),seo推廣是什么意思,張家港做網(wǎng)站收費(fèi)標(biāo)準(zhǔn),給女友驚喜做網(wǎng)站python自動(dòng)化辦公之—Word python-docx庫(kù) 1、安裝python-docx庫(kù) pip install python-docx2、基本語(yǔ)法 1、打開(kāi)文檔 document Document() 2、加入標(biāo)題 document.add_heading(總標(biāo)題,0) document.add_heading(?級(jí)標(biāo)題,1) document.add_heading(?級(jí)標(biāo)題,2) 3、添加文本 para…

python自動(dòng)化辦公之—Word
python-docx庫(kù)

1、安裝python-docx庫(kù)

pip install python-docx

2、基本語(yǔ)法

1、打開(kāi)文檔
document = Document()
2、加入標(biāo)題
document.add_heading('總標(biāo)題',0)
document.add_heading('?級(jí)標(biāo)題',1)
document.add_heading('?級(jí)標(biāo)題',2)
3、添加文本
paragraph = document.add_paragraph('?本內(nèi)容')
4、設(shè)置字號(hào)
run = paragraph.add_run('設(shè)置字號(hào)、')
run.font.size = Pt(34)
5、設(shè)置字體
run = paragraph.add_run('設(shè)置中?字體、')
run.font.name = '宋體'
r = run._element
r.rPr.rFonts.set(qn('w:eastAsia'), '宋體')
6、首行縮進(jìn)
left_indent :左邊縮進(jìn)
right_indent :右邊縮進(jìn)
first_line_indent :??縮進(jìn)

3、樣例1

from docx import Document
from docx.shared import Inches
doc = Document()
article = doc.add_paragraph ()
a2 = article.add_run("因______,特向您請(qǐng)事假____天。請(qǐng)假時(shí)間?_____年\
___?___??_____年___?___?。這段時(shí)間內(nèi)原計(jì)劃安\
排的課程已做好處理,希望領(lǐng)導(dǎo)批準(zhǔn)。")
# ??縮進(jìn)2個(gè)字符
article2_format = article.paragraph_format
article2_format.first_line_indent =Inches(0.3)
doc.save('test.docx')

4、增加列表

from docx import Document
from docx.shared import Inches
doc = Document()
doc.add_paragraph('?序列表1', style='List Bullet')
doc.add_paragraph('?序列表2', style='List Bullet')
doc.save('test.docx')
# Style='List Bullet' # 為?序
# Style='List Number' # 為有序

5、添加圖片

from docx import Document
from docx.shared import Inches
doc = Document()
doc.add_picture('圖片.jpg',width=Inches(1.35),heigh=Inches(1.35))
#png為圖?名稱(chēng)(必須與代碼?件在同?個(gè)?件夾內(nèi))
doc.save('test.docx')

6、添加表格

table = document.add_table(rows=1, cols=3)
hdr_cells = table.rows[0].cells
hdr_cells[0].text = 'Name'
hdr_cells[1].text = 'Id'
hdr_cells[2].text = 'Desc'
#再添加三行表格
for i in range(3):row_cells = table.add_row().cellsrow_cells[0].text = 'test'+str(i)row_cells[1].text = str(i)row_cells[2].text = 'desc'+str(i)
doc.save('test.docx')

7、獲取文檔操作

from docx import Document
docu = Document(r'test.docx')
paragraphs = docu.paragraphs
for paragraph in paragraphs:print(paragraph.text)

8、最終樣例

from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx import Document
from docx.shared import Pt, Inches
from docx.oxml.ns import qn
doc = Document()
# 全局字體設(shè)置
doc.styles['Normal'].font.name = u'宋體'
doc.styles['Normal']._element.rPr.rFonts.set(qn('w:eastAsia'), u'宋體')
# 1、標(biāo)題
title = doc.add_paragraph ()
title1 = title.add_run ('公司員?請(qǐng)假條') # 內(nèi)容
title1.font.size = Pt(20) # 設(shè)置字體??
title1.bold = True # 加粗
title.alignment =WD_PARAGRAPH_ALIGNMENT.CENTER
# 2、正?
article1 = doc.add_paragraph ()
a1 = article1.add_run('__部:')
article2 = doc.add_paragraph()
a2 = article2.add_run(
'因_______ ,特向您請(qǐng)事假天。請(qǐng)假時(shí)間?_年???_年??。這段時(shí)間內(nèi)原計(jì) 劃安排的課程已做好處理,希望領(lǐng)導(dǎo)批準(zhǔn)。')
# ??縮進(jìn) 負(fù)值表示懸掛縮進(jìn)
article2_format = article2.paragraph_format
article2_format .first_line_indent =Inches(0.3)
article3 = doc.add_paragraph ()
a3 = article3.add_run('請(qǐng)假?:') # 內(nèi)容
article3.alignment =WD_PARAGRAPH_ALIGNMENT.RIGHT
article3_format = article3.paragraph_format
article3_format.right_indent = Inches(0.9)
nowData = doc.add_paragraph ()
n3 = nowData.add_run('年 ? ?') # 內(nèi)容
nowData.alignment =WD_PARAGRAPH_ALIGNMENT.RIGHT
nowData_format = nowData.paragraph_format
nowData_format .right_indent = Inches(0.3)
# 這?步調(diào)整?件格式為居中
doc.save('test.docx' )

在這里插入圖片描述

http://www.risenshineclean.com/news/41193.html

相關(guān)文章:

  • 權(quán)大師的網(wǎng)站是哪個(gè)公司做的香港疫情最新消息
  • 網(wǎng)站建設(shè)為中心百度關(guān)鍵詞收錄
  • 個(gè)人主頁(yè)自助建站搜索引擎的工作原理分為
  • 孝感 網(wǎng)站建設(shè)百度電商廣告代運(yùn)營(yíng)
  • 棗莊專(zhuān)業(yè)做網(wǎng)站競(jìng)價(jià)廣告代運(yùn)營(yíng)
  • 網(wǎng)站域名個(gè)人備案查詢(xún)推廣平臺(tái)排行榜app
  • 國(guó)外超酷設(shè)計(jì)網(wǎng)站游戲推廣
  • 如何做服裝的微商城網(wǎng)站重慶森林經(jīng)典臺(tái)詞獨(dú)白
  • 云南省建設(shè)工程招標(biāo)投標(biāo)行業(yè)協(xié)會(huì)網(wǎng)站百度seo排名優(yōu)化教程
  • vs2010做網(wǎng)站時(shí)間控件廊坊網(wǎng)站排名優(yōu)化公司哪家好
  • readme.md做網(wǎng)站seo平臺(tái)是什么意思
  • 哪個(gè)網(wǎng)站可以做優(yōu)惠券seo技術(shù)培訓(xùn)寧波
  • qq是哪個(gè)公司開(kāi)發(fā)seo排名平臺(tái)
  • 特價(jià)手機(jī)網(wǎng)站建設(shè)1688seo優(yōu)化是什么
  • 網(wǎng)頁(yè)設(shè)計(jì)實(shí)訓(xùn)報(bào)告實(shí)訓(xùn)小結(jié)深圳百度seo整站
  • 網(wǎng)站logo怎么做最清楚惠州網(wǎng)站制作推廣
  • 廈門(mén)app網(wǎng)站建設(shè)平臺(tái)推廣是什么工作
  • 建站之星如何建網(wǎng)站sem推廣是什么
  • 哪里做企業(yè)網(wǎng)站上海seo服務(wù)
  • 天津市做網(wǎng)站的公司查淘寶關(guān)鍵詞排名軟件
  • 香港一卡通app下載鄭州seo外包顧問(wèn)熱狗
  • 去哪里找做網(wǎng)站的百度競(jìng)價(jià)ocpc投放策略
  • 設(shè)計(jì)導(dǎo)航網(wǎng)站 左側(cè)菜單欄網(wǎng)絡(luò)營(yíng)銷(xiāo)課程論文
  • 農(nóng)產(chǎn)品網(wǎng)站如何做地推網(wǎng)易企業(yè)郵箱
  • 網(wǎng)站開(kāi)發(fā)語(yǔ)言 排行榜關(guān)鍵詞seo公司真實(shí)推薦
  • 醫(yī)藥網(wǎng)站建設(shè)客戶(hù)的需求廈門(mén)關(guān)鍵詞排名推廣
  • 西部數(shù)碼 空間做2個(gè)網(wǎng)站什么是新媒體運(yùn)營(yíng)
  • 自適應(yīng)手機(jī)網(wǎng)站 css愛(ài)站網(wǎng)是什么
  • 博物館文化網(wǎng)站建設(shè)青島排名推廣
  • 投訴做網(wǎng)站的電話(huà)服務(wù)器域名查詢(xún)