Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Help with a pretty big macro

Hello everyone!
I've made a macro to export to Excel some pivot tables from QlikView. It works well, but due to the heavy formatting required by the client, it takes quite a while to execute. How can I open a template Excel file that already has all the formatting required by the client, paste my tables in the template and then save the Excel file as a separate file, in VBScript? At your request, I can provide some excel templates.

10 Replies
Highlighted
Creator III
Creator III

Why don't you try with NPrinting??

Regards,

Highlighted
Creator II
Creator II

The client doesn't want to spend any more money than he already had, so until the PM convinces him otherwise, I have to do the best I can with what I have right now

Highlighted

Mihai Iov wrote:

At your request, I can provide some excel templates.

Please post some sample test file and expected output.

Highlighted
Creator II
Creator II

Here are the templates and the expected outputs. The pivot tables' IDs are stored in an array and pasted in the macro. All I want to know is how to open the templates in VBScript, populate them with the pivot tables from QlikView and then saving them as separated files

Highlighted

Please attach your qvw file as well. Also, I would like to see your existing macro. If possible, I will try to reduce the time by modifying your macro code or else will try to paste the data in the above posted templates.

Highlighted
Creator II
Creator II

Here's the qvw. The macros are available in the Edit Module
Regarding pasting the data into the templates, is there any way of doing it by keeping the formatting of the cells(the inner color, lines, etc.)?

Highlighted

Mihai - I will check and get back to you today for sure. Hope this is fine with you.

Highlighted
Creator II
Creator II

It's ok. My main issue right now is trying to figure out a way to paste the tables from QlikView into the Excel templates without ruining the formatting of the excel templates.

Highlighted

You may get more detailed help from an Excel forum - everything derived from CreateObject("Excel.Application") is Excel. The forum might help you find the correct API methods, but you may have to translate the VBA code to VB script.

When you post there, you will need to extract the module code and post that.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein