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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources 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

0 Replies