Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, We have recently upgraded our Qlikview systems to 11.2 . and our scenario is like this : We want our users to export only one object (straight table to pdf) and restrict exporting all other objects. For that in version 10 we had a macro and which is not working after we upgraded our system. Please let help me on this.
Macro:
sub exportCustList
set XLApp = CreateObject("Excel.Application") 'Define Object
XLApp.Visible = True 'Visible set as true
set XLDoc = XLApp.Workbooks.Add 'Open new workbook
XLDoc.Worksheets(3).Delete 'Delete unneeded sheets
XLDoc.Worksheets(2).Delete 'Delete unneeded sheets
XLDoc.Worksheets.Add 'To Add Additional Sheet
'XLDoc.Worksheets("Sheet4").Move, XLDoc.Worksheets("Sheet3") 'Parameter after comma means move param 1 after param 2 (move sheet 4 after sheet 3)
'XLDoc.Worksheets("Sheet3").Move XLDoc.Worksheets("Sheet2") 'no comma means move param 1 before param 2 (in this case it would move sheet 3 before sheet 2)
'Format cells
set table = ActiveDocument.GetSheetObject("CH430") 'Qlikview object that you are pulling data from (in this case chart 2)
'Copy table and paste into Excel
set XLSheet = XLDoc.Worksheets("Sheet1") 'sheet where data should be pasted
table.CopyTableToClipboard true
XLSheet.Paste XLSheet.Range("A1") 'Starting Column in which to paste data
XLSheet.Name = "Customer List" 'Rename worksheet
'Add additional statements like the section above (‘Format cells through the rename statement) to copy and paste additional Qlikview objects into sheets in the same workbook.
end sub
sub ExportCustList
ActiveDocument.GetSheetObject("CH455").SendToExcel
end sub
sub ExportFullCustList
ActiveDocument.GetSheetObject("CH431").SendToExcel
end sub
any help...