xAPI export option report to local file

I’m wanting to retrieve the JSON/XML file from the Active Presenter xAPI export and not report to a HTTP Adress. Is there a way to store the report locally to device?

ActivePresenter version:

Windows 10 Pro - 64bit


I’m wondering why you need to store the report data locally to the user device?

If you don’t have a web server to collect user reports, you can store them in a Google spreadsheet or send them to your email as mentioned in this tutorial: How to Send Quiz Report to Google Sheets or to an Email Box - Atomi Systems, Inc.

In case you still want to store the report locally, you can add the following script to On Click event of a button to do that:

function download(content, fileName, contentType) {
    var a = document.createElement('a');
    var file = new Blob([content], {type: contentType});
    a.href = URL.createObjectURL(file);
    a.download = fileName;
var reportString = JSON.stringify(prez.reportData(), null, 2);
download(reportString, 'report.txt', 'text/plain');


Hi ToanLS, I appreciate the prompt response. A use for storing the report locally would be to track progress on an activity on PC without a network connection. Import the info from the local file to a third party application. So, for example, if I have an AP project that progresses based on the score of the previous “level”, have that project running on a browser (HTML export) and if the user closes the browser for whatever reason and opens it up again, they wouldn’t have to start all over again. Data would be read from the report and have the progress to a level where they had left off from.

I’ll test with the script template you sent and let you know how it goes.

It worked like a charm, thank you.

1 Like