Add Sense for Excel version 2.0.0 is now available in Microsoft App SourceĀ .

This is not a huge release – it has basically only one new feature.

You can now refresh your datasets when the Qlik Sense app is reloaded.

This will replace the existing dataset in the spreadsheet with new values but keep formatting. The same selections you used originally will be used, and the same calculations.

  • if the app has been updated after you insert a dataset in your Excel spreadsheet, you will see the text ‘Outdated’ in the list of inserted tables in the add-in
  • the menu that is now available in the table list contains a choice to refresh the data
  • if you select this alternative, the addin will apply the same selections originally used when extracting data, and then extract the same data, replacing the old dataset
  • the text ‘Outdated’ will no longer show

While this is a small change it is pretty important and could save you a lot of work. No longer will you need to make a new export of an Excel file and paste it into your spreadsheet. The add-in takes care of that for you.

Good to know

  • only datasets you explicitly select to refresh will change. You can keep the old state for some if you wish.
  • you can make a copy of your spreadsheet (copy ‘Sales Aug’ to ‘Sales Sept’ for example) and refresh the copy but keep the original unchanged
  • Excel will not overwrite cells for you, so if your dataset might be larger this time you should not have any content below it.

You’ll find more info, setup instructions etc here.

Back in 2016 I wrote a post on running a reload from a Qlik Sense mashup. To recap, I described two ways:

  1. call the Engine API method doReload(). Use this in Qlik Sense desktop, since it’s the only method available.
  2. use the repository callĀ App reload optionally with the help of the callRepository method. This is of course only relevant in a server installation.

You’ll find code examples in my original post, and also how to know if you are running in server or desktop.

What happens when you use /app/reload ?

While this method works well in some scenarios, like when you just want to run one reload of an app ASAP, it has some limitations. Behind the scenes Qlik will create a very simple task for you, and try to start it immediately. The task will look like this:

Very basic, just an app, a name, an the default Task session timeout of a day (or 1440 minutes). No triggers, since the task is started by the REST call, no tags, no custom properties. And, perhaps most important, no retries. This means that if you create a series of reloads this way, most likely only the first few will succeed, the rest will fail since there is no engine instance available.

Another method to start a reload

But there is another way to do it. You can easily create the Task yourself, and set whatever parameters you need. Qlik Sense QRS API is really easy to work with, and the callRepository method can help you by fixing the xrfkey and wrapping the call in a javascript Promise. So creating a reload task can be made as simply as this:

This will create the reload task the way we want it and return the id for the task, whish we can use to start it. That’s just another call to the Repository like this:

And that’s it. A little more code than the second method, but much more control over what we get.