Today I want to share a pretty cool trick with you – about extracting images from QlikView documents. Last week I struggled at work with extracting one of the images used in a QlikView document by previous developers. It was essential to get it, edit a little bit and finally use again. Problem – source file was gone… Or was it? Hopefully it is possible to retrieve any image from QlikView document, as those are there in the document layout, Base64 encoded.
My example QV sheet looks like that (ain’t Mona Lisa, I know):
What we can see here is basically a sheet with background image (set by document settings) and a text object with Qlik Community logo set as its background.
First step for retrieving both of them is Exporting Document Layout. To to this, go to File -> Export -> Export Document Layout (you will be asked to provide folder name, to which all structure will be created)
In line with other files (like your load script), you will find here XML files for objects used in the document.
We are interested in two files:
- DocProperties.xml (as this is where document background file is specified)
- TX04.xml (as this is the object ID of Text object with Qlik Community background)
We will use TX04.xml as an example, as method works exactly the same for any XML…
Steps to follow:
- Open XML file in any text aditor (even Notepad is fine)
- We are looking for a block of characters between <Bmp enctype=”base64″> and </Bmp> tags
- It will look like that:
- Copy every single character between tags
- You can google any Base64 encoder, for this example we will use http://codebeautify.org/base64-to-image-converter
- Simply paste the string and click Generate Image button
- Voila! Image is shown on your screen and you can download it:
I hope you will find this small tutorial useful and you will now hand extracting images from QlikView documents easily!
If you have any questions or comments, do not hesitate to use comments section!