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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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

0 Replies