使用Python在OpenOffice / Microsoft Word中格式化输出 [英] Formatted output in OpenOffice/Microsoft Word with Python

查看:350
本文介绍了使用Python在OpenOffice / Microsoft Word中格式化输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要格式化,可编辑输出的项目(Python)。由于最终用户不会在技术上精通,输出需要以文字处理器可编辑格式。格式是复杂的(项目符号,段落,粗体等)。

有没有办法使用Python生成这样的报告?我觉得应该有办法使用Microsoft Word / OpenOffice模板和Python来做到这一点,但我找不到任何先进的,以获得良好的格式。有什么建议吗?

Word就会把它作为一个Word文档打开,而大多数用户都不会比较聪明。



除非技术人员可能会说,我的这个很小Word文件! :)

I am working on a project (in Python) that needs formatted, editable output. Since the end-user isn't going to be technically proficient, the output needs to be in a word processor editable format. The formatting is complex (bullet points, paragraphs, bold face, etc).

Is there a way to generate such a report using Python? I feel like there should be a way to do this using Microsoft Word/OpenOffice templates and Python, but I can't find anything advanced enough to get good formatting. Any suggestions?

解决方案

A little known, and slightly evil fact: If you create an HTML file, and stick a .doc extension on it, Word will open it as a Word document, and most users will be none the wiser.

Except maybe a very technical person will say, my this is a small Word file! :)

这篇关于使用Python在OpenOffice / Microsoft Word中格式化输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆