weixin_33711647 2009-05-21 03:42 采纳率: 0%
浏览 42

动态生成.doc文件

How can you dynamically generate a .doc file using AJAX? Python? Adobe AIR? I'm thinking of a situation where an online program/desktop app takes in user feedback in article form (a la wiki) in Icelandic character encoding and then upon pressing a button releases a .doc file containing the user input for the webpage. Any solutions/suggestions would be much appreciated.

PS- I don't want to go the C#/Java way with this.

  • 写回答

2条回答 默认 最新

  • weixin_33728268 2009-05-21 04:00
    关注

    It don't have to do much with ajax(in th sense that ajax is generally used for dynamic client side interactions)

    You need a server side script which takes the input and converts it to doc.

    You may use something like openoffice and python if it has some interface see http://wiki.services.openoffice.org/wiki/Python

    or on windows you can directly use Word COM objects to create doc using win32apis but it is less probable, that a windows server serving python :)

    I think better alternative is to generate PDF which would be nicer and easier. Reportlab has a wonderful pdf generation library and it works like charm from python. Once you have pdf you may use some pdf to doc converter, but I think PDF would be good enough.

    Edit: Doc generation On second thought if you are insisting on DOC you may have windows server in that case you can use COM objets to generate DOC, xls or whatever see http://win32com.goermezer.de/content/view/173/284/

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料