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