Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

roee1983
New Contributor II

Export to Excel 3 Tables into One Sheet

Hi all,

I have these 3 different tables Pivot tables.

I want to create an option(I think it will be with a macro)  to export them to excel file to one sheet with a space of a line

any suggestions?

Thanks

Roee

1 Solution

Accepted Solutions
ashwanin
Valued Contributor

Re: Export to Excel 3 Tables into One Sheet

5 Replies
ashwanin
Valued Contributor

Re: Export to Excel 3 Tables into One Sheet

ashwanin
Valued Contributor

Re: Export to Excel 3 Tables into One Sheet

Re: Export to Excel 3 Tables into One Sheet

sriharsha96
Contributor II

Re: Export to Excel 3 Tables into One Sheet

Hi

try the below macro

just change TB05 and TB04 to your TableBox ID's or any Chart ID's also if you want to add just add it with "," and chartid with "

sub new_to_Export

Set Obj_XLApp = CreateObject ("Excel.Application")

Obj_XLApp.Visible = true

Obj_XLApp.DisplayAlerts = true

set Obj_XLTemplate = Obj_XLApp.Workbooks.Add

Obj_XLTemplate.worksheets ("sheet1").range ("A1").select

Obj_XLTemplate.worksheets ("sheet1").range ("A1").value="Title............."

for each  chartID in array("TB05","TB04")  'change them accordingly to your chat ID's'

  lastrow=Obj_XLTemplate.worksheets ("sheet1").Range ("A65536").End (-4162).Row

  Set objSource = ActiveDocument.GetSheetObject (chartID)

  Obj_XLApp.cutcopymode = false

  Call objSource.CopyTableToClipboard (True)

  Obj_XLTemplate.worksheets ("sheet1").range ("A"& lastrow + 2).select

  Obj_XLTemplate.worksheets ("sheet1").paste

next

end sub

Regards

Harsha

roee1983
New Contributor II

Re: Export to Excel 3 Tables into One Sheet

Thank u all

Community Browser