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

Dynamically paste two tables in Excel with a macro

Hello and happy holidays!
I'm making a macro to export some pivot tables from QlikView to Excel and at the moment I'm pasting them on excel ranges in a hard-coded trial-and-error manner. Is there any way to get the last row of a table you just pasted into Excel from QlikView, using VBA macros? I want to make the whole macro work more dynamically.

For example, assuming I have two tables(with ID "CH01"):

Employee_IDDayHours worked
ChWb

28/10/2017

8
pOD715/10/20178
TBKs22/11/20178
a6Ua18/11/20178
35PP02/12/20178

and(with ID "CH02")

Employee_IDHours worked/Month
ChWb160
pOD7160
TBKs160

How should I write the VBA script so that the second table is pasted right below the first table, without hard-coding the range values?

1 Reply
tamilarasu
Champion
Champion

Hi Mihai,

Below link might be helpful.

Macro to export multiple tables in to single excel