Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add header dynamically

I export to excel using the following code

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


2.png

How can I add dynamically a header to the report ?

1.png

Labels (1)
0 Replies