Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I export to excel using the following code
sub xport2xl()iRow = 1set xlApp = CreateObject("Excel.Application")xlApp.Visible = Trueset xlWB = xlApp.Workbooks.Addset xlSheet = xlWB.Worksheets(1)set obj = ActiveDocument.getsheetobject(ChartName)xlSheet.ActivatexlSheet.Cells.Clearwhile not (isempty(xlSheet.Cells(iRow,1)))iRow = iRow+2wendset txt1 = ActiveDocument.GetSheetObject("CH10001")txt1.CopytableToClipboard TRUExlSheet.Cells(iRow,1).SelectxlSheet.Pasteend sub
How can I add dynamically a header to the report ?