Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
big_dreams
Creator III
Creator III

Why don't you try with NPrinting??

Regards,

Anonymous
Not applicable
Author

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

tamilarasu
Champion
Champion

Mihai Iov wrote:

At your request, I can provide some excel templates.

Please post some sample test file and expected output.

Anonymous
Not applicable
Author

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

tamilarasu
Champion
Champion

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.

Anonymous
Not applicable
Author

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.)?

tamilarasu
Champion
Champion

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

Anonymous
Not applicable
Author

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.

jonathandienst
Partner - Champion III
Partner - Champion III

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