Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a QlikView Application with lots of objects, one of them being a straight table.
I have created a macro button called "Generate Invoice File" in the application using the following code in the module:
SUB ExportChartToCSV
SET objChart = ActiveDocument.GetSheetObject("INVOICE")
objChart.Export "C:\Desktop\INVOICE.csv", ","
END SUB
Scripting Engine is set to VBScript
Requested Module Security is set to System Access
Current Local Security is set to Allow System Access
When pressing the "Generate Invoice File" button from my QlikView desktop client, a CSV file is generated on my desktop called Invoice.csv. So far so good.
However, the purpose of this QlikView Application is for the end users in the organization to generate CSV files for their respective customers, through the web-based QlikView Dashoard.
Basically, the end users should be able to press the "Generate Invoice File" button from the web-based QlikView Dashboard, and have a INVOICE.csv generated, but instead of saving it to their desktop or a specific predefined location, I want them to be prompted on where to save the file.
At the moment, even pressing the macro button from the web-based QlikView Dashboard it doesn't do anything, not even creating the INVOICE.csv file on my desktop. But this is less relevant, because I want to get a pop-up on where to save the file.
There is a work around though, where I have to right click on the upper right corner of the straight table, then press export and get a prompt on where to save the CSV file. Is there a way to have a macro button do that?
Br,
Nissar
The web-based AJAX client doesn't support macros. I think you can right click anywhere on the table to export. That's probably the most reliable way to export in AJAX.
If you really want a button... you can look at this option:
The web-based AJAX client doesn't support macros. I think you can right click anywhere on the table to export. That's probably the most reliable way to export in AJAX.
If you really want a button... you can look at this option:
I tried following the example shown in the link you posted, but I am getting an error.
I have written to the author of that post to see if he can reply.
Thanks for the answer though!
Br,
Nissar
Check out the following Help link, click the Actions link on the right side to jump to that section of the Help, scroll down to the Export action, that should put you the right track for a button export.
The issue with export in Ajax, is server-side v client-side, you have to use the ExportEx API I believe.
Regards,
Brett
The action export only exports a table in the data model, not straight table charts. I don't think it works in ajax either. ExportEx is VB macro and is not supported in Ajax.
Mike, you are incorrect in your statement that VB macro is unsupported in Ajax, some of the APIs will work, the main issue in Ajax is as I stated previously, if the API is client-side, then it will not work, but if the API is server-side, things will work.
Macros in general should be a last resort in that macros do force a single-thread condition, which causes poor performance, but if that is the only way to do things...
I do agree, the best option is the caption bar Excel option to do the export, and if everything needs to be CSV, the following setting could be added to the QVS settings.ini within the [Settings 7] section:
RowLimitForCsvInsteadOfXls=x where x is the number of rows, but this will impact the entire environment, so if you want people to be able to do Xls, then modifying this is not likely the right solution either.
Regards,
Brett