Xcelsius XLF dissected!

We all know that .xlf is the file extension for all Xcelsius source files. However, did you ever wonder what an XLF file is comprised of? How is it built behind the scenes? Here is an interesting post by Fernando Ferrer from Clear Peaks.

According to Fernando, the XLF file is made out of 3 different files/folders. You can extract them by simply renaming the file extension from .xlf to .zip and extracting the same into a folder.

Xcelsius XLF Composition

  1. xldoc: This is the same Excel Data model that was used when you designed the dashboard in Xcelsius. You can rename it to .xls to open it in MS Excel. It retains all the formatting.
  2. document.xml: This XML file contains all your components, components and logic definitions. You are free to edit using any XML editor.
  3. A Folder: This folder contains all the pictures embedded in your Xcelsius file. So you can always retrieve them even if you had them embedded in your XLF.

As the post title mentions these are indeed some new insights into the XLF file which opens a wide variety of options to the developers to tweak their XLFs without even launching Xcelsius. One of the tricks mentioned by Fernando in his post was to rename the server name for all the QaaWS connections by editing the QaaWS properties in the XML document. (You can replace the server of your QAAWS connections: just search for your server name to find the entries of your QAAWS connections (with the credentials if they are hardcoded in the model) then replace them for the new server.)

Go ahead and play with it and let us know if you make any interesting discoveries with the extracted files. We would love to spread the word. Use the comments section to shout it out.

  • Pingback: Tweets that mention Xcelsius XLF dissected! – MyXcelsius.Com -- Topsy.com()

  • Muhammed Ismail

    Kalyan,

    Excellent post, thanks for sharing.

  • I am curious is if modifying the contents of an XLF is in violation of any of the terms in the Xcelsius EULA? Something I found interesting is the EULA is not accessible anywhere in Xcelsius (after searching the install directory)… Does anyone recall at what point of the purchase or install process we have to agree to the Xcelsius EULA?

    This may be something that we want to look into with BusinessObjects before going too far down the path as recommending this as a best practice. With that said, this is very helpful information for everyone to understand the inner workings of the Xcelsius project files.

    Thanks for the post!

  • @Ryan, Valid point. Never clicked me though. Do share the info if you hear back anything from BOBJ.

  • Sam

    I am curious is if modifying the contents of an XLF is in violation of any of the terms in the Xcelsius EULA? Something I found interesting is the EULA is not accessible anywhere in Xcelsius (after searching the install directory)… Does anyone recall at what point of the purchase or install process we have to agree to the Xcelsius EULA?

    This may be something that we want to look into with BusinessObjects before going too far down the path as recommending this as a best practice. With that said, this is very helpful information for everyone to understand the inner workings of the Xcelsius project files.

    Thanks for the post!

  • Fernado Ferrer

    Nice to hear you liked my post!

    Kalyan, thank you for the link.

    Good point about the EULA, please, let me know if you find out something on this topic…

  • Roeland Nieuwenhuis

    Nice tip. Also a nice timesaver if one were able to modify XLS and update that into the zip file (automated XLS updates!). However, I am unable to do so using the following steps.

    1) extract and rename xldoc to xldoc.xls (or just fire it up with Excel)
    2) modify the Excel sheet
    3) rezip it

    I already get a problem with zipping it, stating that the archive gets corrupted. Making a brand new zip does not work either. Has anyone gotten this to work?

  • Scott Strool

    Although you can *unzip* an xlf file to view the contents of the project file, it is completed unsupported and possibly dangerous. SAP Business Objects does not publish this for a reason and it certainly can change in future releases.

    I discovered this on my own a few weeks ago while backing up my project files. I dragged an xlf on top of WinZip and it opened rather than added the file.

  • Fred

    Noticed that the zip file format is 2.0. Which means that if saved back to a zip, you need to find/use Winzip 2.0.

  • I already asked in the official forum if there are any plans to document or open the document specification:

    http://forums.sdn.sap.com/thread.jspa?threadID=1561863&tstart=30

    Unfortunately there no plans to document this xml-syntax.

    Imagine dynamically building swfs from dynamic XLF on a server at runtime…….

  • Hi Kalyan,

    thanks for your posts and in general your website, MyXcelsius. anyway, i wanted to expose a few things here.

    -= 1 =-
    previous posts about this being seriously dangerous are correct. the XML standards are not locked down between versions. so naturally, if you were to change something in there who knows what would happen, and there’s no documentation on this sort of thing to help out.

    -= 2 =-
    have you ever noticed that as you build / edit your XLF it seems to slow down on you? i don’t mean more components == slower, i mean obviously slow with an unobvious reason. well, your XLS may be the cause. perform the above posts action to extract the XLS. if you have OpenOffice Calc, just use this to Save-As a new XLS file, or with Office2007 put it through a few save-as’s between XLS and XLSX and back to XLS. what you are looking for is the size of the XLS to dramatically shrink. OpenOffice purges all of the “junk” that Excel puts into your XLS, and this is simply what you are looking to achieve. finally, you can try just plunking the new XLS back in as the “xldoc”, or use XC to re-import the XLS over your old one. either way, backup and play with it.

    -= 3 =-
    expand the above post to configure your ZIP tool to be an OpenWith option for XLF files. this came in VERY handy in my last major XC application where performance was a constant concern. (i was pushing the product a little too hard)
    – right-click on an XLF and choose open with
    – select WinZIP/WinRAR/etc from the browse button (you’ll have to find the executable)
    – confirm that “always use this program” is NOT checked
    – click OK
    – now, as a quick open with, WinRAR will be available OnDemand for you.

    cheers.

    • Kumar Subramanian

      Nice thread!

      Mike,

      Does cleaning up the junk from XLS using OpenOffice (option 2 above) and putting it back to XLS help in anyway to speed up the SWF generation or prevent XC from crashing?

      Kumar

      • this is a test of “pre” tags … ignore
        ———+——–+———–+————+
        | size | SWF Gen | SWF Load |
        ———+——–+———–+————+
        orig XLF | 10 MB | 3-4 min | 75 sec |
        new XLF | 300 kB | 1-2 min | 15 sec |
        ———+——–+———–+————+

      • Hi Kumar,

        cleaning the “junk” did four things on my last project:
        1 – sped up the SWFGen process
        2 – made my XLF and SWF files smaller
        3 – sped up the SWFs response times when interfacing with it (aka, the math was more efficient)
        4 – sped up the SWFs load time (that little “loading” bar you get while it’s launching)

        these little tricks had the impact of:
        ———+——–+———–+————+
        _________|_ size _|_ SWF Gen _|_ SWF Load _|
        ———+——–+———–+————+
        orig XLF |_ 10 MB |_ 3-4 min _|__ 75 sec __|
        _new XLF | 300 kB |_ 1-2 min _|__ 15 sec __|
        ———+——–+———–+————+
        (sorry for bad formatting .. i tried the PRE tags)

        stability … the above may have helped with.

        my biggest tip there are:
        * use an environment (VM … Sun’s VirtualBox is free) that is purely designed for XC dev.
        * a constant stable Adobe Flash environment
        * “just” MS Excel (no other office apps)
        * set the default program for XLS files to OpenOffice Calc. This helps against accidentally opening an XLS into Excel while you are working in XC … often causing XC to stumble on the now locked Excel engine files.

    • @Mike Mid last year, I did notice the file size change when working on an Utilities dashboard. It was so heavy that it took 60Sec to load (SWF). Incidentally, as you keep saving the XLF, the size keeps changing (Although you made no changes). Strange thing is that when selected and cleared all unused cells in my Excel and then saved, the file size dramatically came down. Finally we managed to tune the logic and got rid of excess formatting in Excel and got the SWF load time down to 10sec.

  • This is good stuff. Hopefully the Xcelsius team can take a look at this. It seems crazy that such a simple approach could not be implemented into the product so everyone can take advantage.

    • I can pass this on, though i don’t think much could be done with the XLS portion as it’s basically .NET controls with Office (or whatever language they built it in). So XC is kind of dependent on that.

  • I was hoping that dissecting the XLF could reveal one of the mysteries of Xcelsius and Excel and that is how Xcelsius encodes/decodes line breaks and quotes in an individual cell. This becomes relevant when we export and import data or dynamically concatenating cells.

    This may be another thread in itself, but I suppose this is the audience who may find this interesting.

    • Steve

      When xCelsius compiles the XLF file, it creates an Adobe Flash SWF file that encapsulates the excel data and the content elements along with BusinessObjects components that perform all the functionality. That is where the decoding of line breaks from the Excel data occurs, not in the XLF file format, as xCelsius accesses the embedded Excel file in the XLF directly during the design/build process using Microsoft Office/.NET interfaces. That is why it requires Microsoft Office to be installed in order to operate correctly. The resulting SWF file is then embedded in Powerpoint, web page, etc. with appropriate parameters/interfaces for the output.

  • Steve

    xCelsius uses a fairly strict zip format – the files contained in the root level (the files above the content folder) must appear first in the zip file and all files must be encoded using the Deflate algorithm – it will not recognize files that are just stored with no compression in the zip file. They also do not create a directory entry for the content folder in the zip file. Winzip generally will encode content in alphabetic order which results in the content folder getting encoded first. It also creates a directory entry in the zip file and will use the Store algorithm (no compression) or other compression algorithms depending on the compression settings and in cases where it thinks there is nothing to be gained by compressing the file (small files or files that already have compression – usually the case with embedded swf or jpeg files). I set up a script using the generic unix/linux zip utility to be able to do the compression in the particular order/settings in a consistent fashion, i.e. having it zip the root files first and then updating the zip to add the folder content without encoding the directory by using command line options.

    Regarding the XML format, they have to maintain some consistency with that in order for future versions of xCelsius to be able to open older XLF files, so no real worries there unless you are inventing new XML tags… Since the XLF is a data file and not the application itself, and you are not reverse engineering the application, the EULA can’t really restrict what you do with an open format data file. Business Objects could put in additional format checks or signature stamps on the XLF file in future, but since the xCelsius application is still required regardless to compile the XLF file to an output format, what would they have to gain by doing that? I’ve edited XLF files to correct/change different types of data that are difficult sometimes in the interface to correct such as font embedding/settings not getting changed for some elements, exact sizing/placement, etc.

    Anyway, hope this helps someone.

    • Roeland Nieuwenhuis

      Excellent information Steve. That pretty much explains why I have not been able to create an XLF file: zip order was wrong. Instead of reinventing the wheel, would you be willing to share your packing script?

      • Mike Howles

        For what it’s worth, with Xcelsius 2008 (SP4 and SP5), I’ve had no problems just using Windows 7’s native .ZIP compression feature to recompress the .XLF resources back into a .ZIP/XLF file. Maybe they adopted a less strict extraction algorithm?

  • Jp Golay

    I tried to rezip the files after having modified them but the zipped file format can’be opened back in xcelsius
    What zip parameters does i need tu use?

  • Sanjay

    Hi Kalyan,
    Iam Unable to open the xlf fie,even after following steps
    Need Help…
    Sanjay