Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, can anyone help me.
I'm looking for a macros code that will enable me to send multiple tables/objects to excel with the click of one button in Qlikview.
Please assist
Alwyn
There are some samples in this thread:
Hope this helps:
We have a button which on click runs the below macro and the chart data is exported to excel.
Sub Export()
' Set Excel App
set XLApp = CreateObject("Excel.Application") ' Define Object
XLApp.Visible = True 'Visible set as true
set XLDoc = XLApp.Workbooks.Add 'Open new workbook
' Get TB1
set obj = ActiveDocument.GetSheetObject("CH05")
' Copy table and paste into Excel
set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted
obj.CopyTableToClipboard true 'Copy data to Clipboard
XLSheet.Paste XLSheet.Range("C1") 'Paste data into cell
' Get TB2
set obj = ActiveDocument.GetSheetObject("CH09")
' Copy table and paste into Excel
set XLSheet = XLDoc.Worksheets(1)
obj.CopyTableToClipboard true
XLSheet.Paste XLSheet.Range("A5")
End Sub
Hope this helps:
We have a button which on click runs the below macro and the chart data is exported to excel.
Sub Export()
' Set Excel App
set XLApp = CreateObject("Excel.Application") ' Define Object
XLApp.Visible = True 'Visible set as true
set XLDoc = XLApp.Workbooks.Add 'Open new workbook
' Get TB1
set obj = ActiveDocument.GetSheetObject("CH05")
' Copy table and paste into Excel
set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted
obj.CopyTableToClipboard true 'Copy data to Clipboard
XLSheet.Paste XLSheet.Range("C1") 'Paste data into cell
' Get TB2
set obj = ActiveDocument.GetSheetObject("CH09")
' Copy table and paste into Excel
set XLSheet = XLDoc.Worksheets(1)
obj.CopyTableToClipboard true
XLSheet.Paste XLSheet.Range("A5")
End Sub
Hi Suesh,
this macro will work?
Regards
Sathish