Skip to Content

In some of our XI scenarios we might not want to generate standard XI output files:
flat files, xml files. We may be asked to generate files in some other formats like:
Word, PDF, Excel. What to do then? Do we have to use Java like shown
in some of our great weblogs:

Read Excel instead of XML through FileAdapter

or some other tools like the Conversion Agent?

It turnes out that not necessarily,
we might try to do it without creating adapter modules or generating the output
in an inbound proxy.

How can we generate an Excel file then?

Not mentioning Allen Iverson, in our case XSLT is “

The answer

” 🙂    

image

If we test our scenario we can see that the XI file adapter generates Excel documents.

image

  

…but before we can say we’re done we have to open the document and see if if works just as we planned:

image

I agree – this may not be a very readeable solution and in most cases we’d probably use
some java code or the conversion agent to generate Excel documents
but I hope some of you will like the idea with the XSLT mappings.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Anonymous
    Michal,
    Its really a good idea using XSLT. But, I feel XSLT cannot be used to read Excel files, though it can generate because the input to XSLT Mapping has to be a XML! I also feel this is a limitation.
    If I am right, we shall try to break this limitation 🙂
    Regards,
    Felix
    (0) 
    1. Michal Krawczyk Post author
      Hi,

      I also thing it would be very diffucult to read excel file with XSLT (but not impossibl I guess if someone would save his excel file as XML workbook)

      but this is just a “hint” weblog – showing what you CAN do with XSLT 🙂

      obviously it’s not as flexible as the “dark force” – JAVA:) 

      Regards,
      michal

      (0) 
  2. neha nagrani
    HI,

    I used the code you have mentioned but the an empty excel file is created. Could you throw some light on it?? what could the problem be?

    Thanks.

    (0) 

Leave a Reply