XP is just a number | |
PerlMonks |
generating a microsoft word docby WoodyWeaver (Monk) |
on Jan 22, 2018 at 21:38 UTC ( [id://1207707]=perlquestion: print w/replies, xml ) | Need Help?? |
WoodyWeaver has asked for the wisdom of the Perl Monks concerning the following question: The task is to create a (long) structured document -- it has a bunch of content that is relatively static, and one section that consists of about a thousand question/answer structured blocks that starts off with a table containing a bunch of checkboxes. Contractually, the end result has to be a Microsoft Word document. The usual approach is just to start writing using a Microsoft Word template. However, it seems to me that MS Word is not conducive to clear thought, particularly when a thousand points are required. When I look at other's work using a similar template (these are "system security documents") I find that often people are non-responsive, and I'm guessing its just that the document has so many moving parts. It also strikes me that its difficult to maintain over time (these are supposed to be 'living documents'). My approach was to store all the complicated structured part in a database back end, and then render into something close to the desired format; then have a copy of the Microsoft Word template with the static stuff filled in, and then just insert the rendered text. I can come reasonably close by using html and checkboxes, then figured that the insert would carry the thing home. (Ok, so I really like the idea of a database for lots of other reasons: to prepare for CDM and work across multiple SSPs, to be able to have decent change control and external analysis, to be able to run statistics on the language, etc. A flat textual document just isn't a good approach, imho.) However, it seems like its not doing so -- perhaps because of size/memory issues, perhaps because of openoffice / libreoffice / MS Word conversions, the checkboxes look awful. So, I'm casting about for an alternative -- rendering directly into MS Word. Another complication is that I work with a linux box, not a Windows box, so I'd rather have a native perl approach rather than Win::OLE. I've used that many times in the past, and could make that work I suppose, it just seems inelegant. Is there something like EXCEL::Write::XLSX for microsoft word? Or is there a better way?
Back to
Seekers of Perl Wisdom
|
|