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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

EXPORT QVD WITH VALUE OF A VARIABLE

Hello

I have a macro that exports a file QVD with the employee's name
.
Now I want to add the variable VR_MES the file name that returns months and years.

Employee 02 2011.QVD


sub export_Venda


set obj = ActiveDocument.GetSheetObject("CH14")
set val=ActiveDocument.Fields("Employee").GetPossibleValues
FUNCIONARIO = val.Item(i).Text
obj.ExportEx "D:\Desenv\Qvd_Planejamento_Compra\Venda_"&Employee&".qvd", 4
msgbox("Dados exportados com sucesso")

end sub

Labels (1)
1 Reply
Miguel_Angel_Baeyens

Hi,

First make sure that the variable stores the date properly, and not the numeric format of QlikView nor decimals (dates with times).

Then add in the macro the lines corresponding to the reading of the variable and the path modification:

Sub export_Venda Set obj = ActiveDocument.GetSheetObject("CH14") Set val = ActiveDocument.Fields("Employee").GetPossibleValues Set vFecha = ActiveDocument.Variables("vDateVariable") vFecha = vFecha.GetContent.String FUNCIONARIO = val.Item(i).Text obj.ExportEx "D:\Desenv\Qvd_Planejamento_Compra\Venda_"&Employee&"_"&vFecha&".qvd", 4 MsgBox("Dados exportados com sucesso") End Sub


Hope that helps.