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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Guidok
Contributor II
Contributor II

Export to excel misses headers

Hi,

I've added a export button for exporting some of the tables to excel. This works fine, but the headers are missing.

I've copied the following VSB code from an other post:

sub ExcelExport
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = True
Set xlDoc = objExcel.Workbooks.Add
set obj = ActiveDocument.GetSheetObject("CH02")
obj.CopyTextToClipboard
objExcel.Range("A1").PasteSpecial
xlDoc.SaveAs "C:\Users\xxxx\Desktop\Aanvullen.xlsx"
xlDoc.Close
end sub

What do I need to change to add the headers in the excelsheet?

When I export a table directly to Excel it works fine.

Labels (1)
1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Maybe use ".CopyTableToClipboard true" instead of ".CopyTextToClippboard"?

View solution in original post

1 Reply
m_woolf
Master II
Master II

Maybe use ".CopyTableToClipboard true" instead of ".CopyTextToClippboard"?