Skip to content

Engine parameters documentation

foglcz edited this page Apr 22, 2013 · 11 revisions

The generate_excel template takes no arguments at the very least - in that case, default template will be generated. This is to make sure, your implementation into your systems is correct, think of it as test case.

Most used parameters

  • themes contains xmlNode, copy/paste from xl/themes/theme1.xml
  • styles contains xmlNode, copy/paste from xl/styles.xml
  • sheetNames contains names of the sheet:

Sheet 1 Sheet 2

- `sheetContents` contains contents of **all** `sheetX.xml` files from `xl/worksheets` directory:
```xml
<worksheet ...> ... </worksheet>
<worksheet ...> ... </worksheet>
  • author takes string argument and will use it for author field in document properties Example value would be ACME Corp. Ltd.

Image parameter

  • images takes special argument of xmlNodes <image>, which is defined as follows:
blank_image jpg image/jpeg ```

xdr: & a: namespace dtd is:

xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"

If you want to display same image multiple times, append same <image> tag multiple times. The binary will be present only once within result excel structure. if used multiple times.

If you want to display same image on different positions on different sheets, put the <image> tag multiple times. Altough engine takes multiple usedIn/sheet parameters, the position is still the same for respective image depending on xdr: parameters values. The usedIn is handy shorthand for eg. header image of the excel, which you want on all sheets on same position.

Rarely used parameters

  • vbas takes <vba>filename</vba> xmlNodes. You want to use only one, altough it's possible to use multiple tags. It all boils down to how many .bin files you have in your template excel.
  • printerSettings takes multiple <setting for="1"> elements. There should be one setting file per one worksheet - and the file is also binary. Therefore, the value boils down to template excel you prepared.

Navigation

  1. Preparing excel files
  2. Preparing the first output
  3. Putting plain data into excel sheet
  4. Appending images
  5. Creating multiple worksheets
  6. Printer settings
  7. Macro-enabled workbooks
  8. Under the hood
  9. Engine parameters documentation
  10. Best practice for writing Excel XML
  11. Authors, license, contributing