Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Appending an Export macro call to QVD


I have been trying to export the contents of a straight table into a QVD file using a macro.  While that works fine, I cannot get the append option to work in the ExportEx function.  Has anyone found a way to get this to work as advertised?

I can add a date-stamp to the file instead to make the file unique, but then I am stuck with a long list of files which are not necessary.  Code being used currently is:

Sub ExportDaysCover(vUnit, vExportObject)

  vQVWFile = "D:\Qlikview Dashboards\Regional\Inventory\" & vUnit & "\" & vUnit & " Inventory.qvw"

  vExportFile = "D:\Qlikview_QVD\QVExport\Regional\Inventory\" & vUnit & "\" & vUnit & "_Days_Cover.qvd"

  Set QV = ActiveDocument.GetApplication 

  Set QVDoc = QV.OpenDoc(vQVWFile)

  QVDoc.GetSheetObject(vExportObject).ExportEx vExportFile, 4, true


End Sub

I have been searching for how to get around this for a while.  Tried the AppendExport function too, but didnt get the desired result.  Also tried including all optional parameters to the ExportEx function just in case.

Hopefully I am just missing something obvious! 

Tags (4)
Community Browser