Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Create an Excel document while using AJAX

Hi everybody,

a question for people that know a thing or two about extensions...

It looks like it's impossible to generate an Excel file via macro while running AJAX client... Do you think it's possible to develop an Extension (either an Extension Object or a Document Extension) that could generate an Excel file based on a given set of rows and columns? Would it be something difficult or easy to accomplish?

thanks in advance,

Oleg Troyansky

12 Replies
Alexander_Thor
Employee
Employee

Would a csv file be acceptable? That is pretty easy to generate client side, if you want to generate a excelfile most likely you would want to create a server side call which I guess is kind of redudant since you pass the data to the client, then back to the server and then back as a excelfile but hey some users dig excel

Edit: I have an old example that generates a csv file, let me port that over to QV11 and fine-tune it and I'll post it later tonight.

rbecher
MVP
MVP

Btw. I've build an extension which downloads the data as CSV using data URI. Unfortunately this is only working in Chrome and Firefox.

- Ralf

Astrato.io Head of R&D
rbecher
MVP
MVP

Hi Alex,

how is your solution working?

- Ralf

Astrato.io Head of R&D
Alexander_Thor
Employee
Employee

Well I'm using the blob object that's part of the File API so any modern browser should support it. So in other words no IE8/9.

http://caniuse.com/bloburls

Kind Regards

Alexander Karlsson

26 feb 2013 kl. 17:31 skrev "Ralf Becher" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>>:

QlikCommunity<http://community.qlik.com/index.jspa>

Re: Create an Excel document while using AJAX

created by Ralf Becher<http://community.qlik.com/people/rbecher> in Integration and Extensions - View the full discussion<http://community.qlik.com/message/315761#315761>

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Hi Alex and Ralf,

thank you for your responses. Here is my situation with this request:

- the client is using IE 8.0 as a corporate policy, and I'm afraid we can't change that...

- the need was to store an Excel or a CSV file on the server for later processing, without opening the file to the user. They would actually prefer that the action of storing is performed silently, with minimum or no interaction with the user.

- At the moment, the issue is postponed, to avoid extra costs, but generally speaking, I'd like to know a way of doing it, preferably in a way that would be universal (not dependent on the browser).

Ideally, it would be great if QlikView standard Action "Export" could work in AJAX - after all, QlikView AJAX client is communicating with QlikView Server... I can't see any technological obstacles that should make it impossible to make this Action work... The only issue - it's outside of our control 😞

Alexander_Thor
Employee
Employee

Ah well that simplify things quite a bit

Macros with serverside exports should work even though you use the Ajax client. Heard some reports that csv might be bugged but xls and xml should work.

Kind Regards

Alexander Karlsson

26 feb 2013 kl. 19:31 skrev "Oleg Troyansky" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>>:

QlikCommunity<http://community.qlik.com/index.jspa>

Re: Create an Excel document while using AJAX

created by Oleg Troyansky<http://community.qlik.com/people/troyansky> in Integration and Extensions - View the full discussion<http://community.qlik.com/message/315775#315775>

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Alex,

that's where we started, but for some reason our macro didn't work. Not even sure if it was invoked. Do you have any working examples of the macro with server-side exports?

cheers,

Oleg

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Do you want the file to be exported after reload or user action in Ajax?

We use ServersideExportEx in Ajax for the client.  Since macros in Ajax is run serverside saving the resulting file on the server is not a problem.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Thanks Jerry, we'll try it out. Our export needs to happen based on the user action in Ajax.