Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Export multiple Pivot charts into One Excel Sheet !!

Hello There,

I am facing problem when I need to export multiple pivot charts onto one sheet of excel with spaces.

The code that i am referring to is given below:

sub launchXL

set oXL=CreateObject("Excel.Application")

oXL.visible=True

oXL.Workbooks.Add

aSheetObj=Array("CH564","CH565","CH569","CH568")

for i=0 to UBound(aSheetObj)

oXL.Sheets.Add  

Set oSH = oXL.ActiveSheet

oSH.Range("A1").Select   

Set obj = ActiveDocument.GetSheetObject(aSheetObj(i))

obj.CopyTableToClipboard True

oSH.Paste

sCaption=obj.GetCaption.Name.v

set obj=Nothing    

oSH.Rows("1:1").Select

oXL.Selection.Font.Bold = True      

oSH.Cells.Select

oXL.Selection.Columns.AutoFit

oSH.Range("A1").Select    

oSH.Name=left(sCaption,30)  

set oSH=Nothing 

next

set oXL=Nothing

end sub

I have created a macro for a button in which the code mentioned above is being used.

Kindly help me to get in onto one excel sheet !!!

Thanks in Advance !!

1 Reply
ecolomer
Master II
Master II

See this example: