Qlikview Export to Excel Part 1

Qlikview Export to Excel Part 1 – Simple Qlikview Export to Excel using VBScript Macro

This is the first of a series of posts covering Qlikview and exporting objects (tables, charts, listboxes, etc.) to Microsoft Excel.  This topic is covered extensively on the web, but I wanted to break it down into steps, starting with the most basic export, then getting into more advanced scripting.  While this post provides workable examples, I encourage you to share additional comments or examples in the comments section.

If you find the post below too basic, skip to part 2 of this series by clicking here Qlikview Export to Excel Part 2.  This post covers the following topics:

  • Allow user to select which object to export
  • Prompts the user to select a location to save the Excel file
  • Prompts the user to name the Excel file

Or, skip to part 3 of this series by clicking here Qlikview Export to Excel Tabs with Formatting.  This post covers the following topics:

  • Allow user to select a field to parse the table data into separate Excel Tabs
  • Performs additional formatting in Excel, once the data has been exported


For starters, go ahead and add the following code in the “Edit Module” window:

Once you add this macro, make sure you configure the following in the “Edit Module” window, then click OK

Qlikview Export to Excel Part 1

To run the macro, add a Button object, and set the following properties:

Qlikview Export to Excel Part 1

As a result of the macro above, you can export the content of a chosen object to Excel, with the click of a button.  Please note the following related to this particular example:

  • The macro is hard-coded to export a Table Box object “TB01”
  • The macro is hard-coded to export to a specific folder and file name:
    • “C:\BuffaloBI – Post Content\Qlikview\Export Excel\test.xls”
  • Once the content of the Tablebox is exported to Excel, there is no additional formatting

What’s next?

As shown above, future posts cover more advanced topics in detail.  This includes the following:

  • Allowing the user to select which object to export
  • Prompting the user to specify a file name
  • Exporting content to separate Excel tabs, based on a selected field
  • Additional formatting in Excel after the export


Additional Content

In addition to the post above you can visit my Home Page

Here you will find topics covering  Qlikview  SQL Server  Excel VBA


9 thoughts on “Qlikview Export to Excel Part 1”

    • Hello Tripathi,

      Can you let me know which version of Excel and Qlikview you are using. Also, just make sure all the settings referred to in the post are reflected in your setup (Table Box object ID, macro security settings, etc.).

    • I tested on the Access Point I use and it works okay. Couple questions:

      1. After posting to Access Point, and when you initially open the Qlik file, did you get a prompt asking for security levels? Make sure you answer “Allow System Access”
      2. Did you update the Macro to identify correct table box object ID?
      3. In the line of code “ExcelWorkbook.SaveAs ……”, does your FileFormatNum line up to Excel File Extension? (50 for .xlsb, 51 for .xlsx, 52 for .xlsm, 56 for .xls)
      4. Make sure you set the proper security access in the module window as well, per post.

      Just a couple things to consider. Also, did you get any kind of error, or did the message box “Export Complete” actually pop up?

      • yeah, it seems to be an AJAX client vs IE plugin thing. Using the AJAX client it does not work and I cannot get the IEPlugin to work either.
        1. I used the Allow System Access in the drop down from the Desktop version. I never received a prompt on IE.
        2. I updated the macro to pull the correct Object ID (no issue in desktop version)
        3. I used the xlsx code 51 with the right extension.
        4…not sure what you mean here and how it different than 1. But yes i did that in the edit module window.

  1. Hi All,

    Just a quick question in the reverse direction. Is it possible to export a chart from EXCEL to QLIKVIEW?

    I suppose this is not a place ask this question yet awaiting answers for the same.


    • Hello Sam, can’t say I’ve seen this before, and I’m pretty sure importing objects from Excel isn’t even possible. You can bring the chart image into Qlik (via setting up a bundle load), but I am not aware of any way to import the dimensions, expressions, formatting. Your best bet is importing the data from Excel and building the chart directly in Qlik.

    • Hello Andoni, what type of object are you trying to export? The Table Box in the example only exports visible records, based on filters applied. Are you trying a different type of object (ListBox, Chart, etc.)?


Leave a Comment