Skip to content

Preparing first output

foglcz edited this page Apr 22, 2013 · 15 revisions

Initial start

At first, you want to make sure that your installation is correct. Create your template.xsl file with following contents:

<?xml version='1.0'?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:include href="2012.engine.xsl" />

    <xsl:template match="/">
        <xsl:call-template name="generate_excel">
        </xsl:call-template>
    </xsl:template>
</xsl:stylesheet>

Then you should run this file with saxon processor. If you're not familiar, we have included a .bat file which contains the proper command:

"C:\Program Files\Saxonica\SaxonHE9.4N\bin\Transform.exe" -xsl:step1/template.xsl -warnings:recover -o:./step1/output -s:step1

There are several things going on, which we will cover in Under the hood chapter.

After processing the whole thing with saxon, you will have entire directory structure of your excel template created. Within there, you need to replace media/blank_picture.jpg with a correct file - saxon, by default, generates only blank files (and also screams about that.)

After replacing binaries with their proper counterparts, zip the contents and rename .zip to .xlsx . Then open the file and .. voila!

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. Wrapping up

Clone this wiki locally