Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Mon, 05 Jan 2009

Exporting to MS Word

If you're developing a web application that runs on Linux, and a customer asks for a report in MS Word format, you're going to be in a lot of pain. One approach is buying a Windows licence, installing it in a virtual machine, and hooking up an application to drive it over COM, and then figuring a way to talk to the VM from your web app. A simpler approach is generating a web archive file (.mht) and pretending it's a .doc file. Word happily opens it, usually.

Here's a random helpful tip: try not to have more than 2047 <ul> elements in it, or they'll start spontaneously nesting.

posted at 18:54 | tags: | permanent link to this entry | 0 comments

Name (required)


E-mail (will not be shown)


URL


Comment (some HTML allowed)