You can replace TMDX by OOXML in the subject-line of this post. Now I have a ruby-program which does the work for me: It generates a table and fills the first column with a sequence of dates (or numbers). Some variables are set by command-line arguments. I present you the complete usage-message:
Code: Select all
michael@paulo:~$ tm_gen_table -h
Usage: /usr/local/bin/tm_gen_table <options>
Specific options:
-w, --weeks Delimit weeks
--highlight highlight week-ends
--no-we Ignore week-ends
-b, --begin=VALUE Begin value
-c, --cols=NUM Number of columns
-e, --end=VALUE End value
-t, --templates=TEMPLATE Directory of templates
-d, --date=FORMAT Generate date-cells (default)
-n, --number=WIDTH Generate number-cells
-f, --file=FILE Write output to file FILE
Common options:
-h, --help Show this message
-v, --version Show version and program information
I frequently need such a table for monthly resumes. The template option allows me to pre-define headers, footers and the general styling of the new document.
**Why here?**
The absence of a programming-interface is oftentimes lamented in the forum. However, with the choice of an OOXML file-format, everything which is possible with XML is possible with the SoftMaker file-formats like tmdx or pmdx.
Creating or manipulating the file directly, you are independent of all software-imposed constraints. The risks are minor, as a file which is processed, later, in a text-processor or spreadsheet-program, will be saved anew, from memory, and thus cleaned of useless or ill-chosen constructs.
For your inspiration or bewilderment I attach a current Ruby-gem (basically a tar-archive, remove the zip-extension, it is there only to make this forum accept the file) and the man-page for my above mentioned program. Being out of professional programming for years, I can only claim that it works for me. Use at your own risk or scrutinize the code after untaring (tar -xf) the gem.
The best that you can do is take it as an example for your own specific solutions.