Export Excel with Macro will work on Desktop and with the IE Plugin, but will not work Ajax, why?
Environments:
- Qlikview Server, 9 and higher
- AJAX client
Macros provide access to the Export to Excel functionality, but these must be executed on the server (not the client). This is available from the client, but needs to be invoked via a Macro using Visual Basic, and Macros written in Visual Basic in particular will need to be executed by ActiveX in Internet Explorer. This is a functionality offered by the IE plugin only (not by the web/AJAX client) and only in Internet Explorer.
(side note, we don't recommend using Macros going forward unless you want to be locked down to IE11; ActiveX is disabled by default in IE11 and removed entirely in Edge for security reasons, see
Qlikview Macros Work in Windows 7 / Internet Explorer 10, but not in Windows 10 / Internet Explorer 11 or Edge and
Considerations When Using Macros In QlikView)
This means you would need to do this via Javascript, unfortunately there aren't any JS functions in the Qlikview extension/client API available for exporting to Excel. What you might do as a workaround is loop over the data in an object to generate a CSV file and present that to the user, such as discussed here in
this discussion on Community.