Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a container that contains two tables : CH10001 and CH10002
with the following code I can export CH10001
sub xport2xl()
iRow = 1
set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
set xlWB = xlApp.Workbooks.Add
set xlSheet = xlWB.Worksheets(1)
set obj = ActiveDocument.getsheetobject(ChartName)
xlSheet.Activate
xlSheet.Cells.Clear
while not (isempty(xlSheet.Cells(iRow,1)))
iRow = iRow+2
wend
set txt1 = ActiveDocument.GetSheetObject("CH10001")
txt1.CopytableToClipboard TRUE
xlSheet.Cells(iRow,1).Select
xlSheet.Paste
end sub
How can I export CH10001 and CH10002 in the same workbook but with dynamic sheet name ? add the getdate in the name of the sheet for example ?
See this blog post: http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/