Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Conditional Running of Macro Based on Filename

Hi Guys,

QVW filename : expenses.qvw

Sub ExportExcel()

  Call ExportToExcel("tblExpenses","c:\expenses.xls")

End Sub

Sub exportToExcel(objectId, filePath)

  Dim O

  Set O = ActiveDocument.GetSheetObject(objectId)

  O.ExportBiff filePath

  Set O = Nothing

End Sub

I'm calling this macro upon successful reload, is there a way for me to run this only when the filename is = expenses2014.qvw?

Since the filename is expenses.qvw even i call the macro it should just end without executing any command.

Thanks