Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Maybe use ".CopyTableToClipboard true" instead of ".CopyTextToClippboard"?
Maybe use ".CopyTableToClipboard true" instead of ".CopyTextToClippboard"?