pzweuj / wordwriter Goto Github PK
View Code? Open in Web Editor NEW替换docx文件标签内容的python模块
License: MIT License
替换docx文件标签内容的python模块
License: MIT License
表格底部样式数据未应用
Traceback (most recent call last):
File "...\WordWriter\test\Demo.py", line 20, in
ww.WordWriter("test.docx", "output.docx", resultsDict)
File "...\WordWriter\test\WordWriter.py", line 346, in WordWriter
fillTable(i[0], i[1], i[2], replaceDict[k])
File "...\WordWriter\test\WordWriter.py", line 269, in fillTable
tagBottomStyle, tagTableStyle = get_table_bottom_border_details(table, row_id, cell_id)
File "...\WordWriter\test\WordWriter.py", line 95, in get_table_bottom_border_details
tbl_bottom_border = tbl_borders.find(nsqn("w:bottom"))
AttributeError: 'NoneType' object has no attribute 'find'
用您的测试文件及脚本,可以运行。
但是应该是兼容性问题,我用的word2016,插入新表后运行会报错(但是直接复制模板里的表又可以)。
ww.WordWriter("word2016test.docx", "word2016output.docx", resultsDict)
File "g:\WordWriter-master\WordWriter-master\test\WordWriter.py", line 223, in WordWriter
fillTable(i[0], i[1], i[2], replaceDict[k])
File "g:\WordWriter-master\WordWriter-master\test\WordWriter.py", line 154, in fillTable
r0 = p0.runs[0]
IndexError: list index out of range
另外也想请问下您有没有自动合并单元格的好办法
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.