Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

About saving a file in a specified time interval

hi,

What my problem is

How to save a dataobject of a qlikview file at specific date and time interval in our required path that is exported in any one of the file types like(xls,txt,qvd,html,xml) from the macro throuh using buttons...

what the process i have done is,

-> I have a dataobject like(tablebox) , and I have buttons like("XL" , "QVD" ,"TXT" ,"HTML" , "XML" )

->I have created macros for each and every button what i have. and the code like this


Sub Excel

set obj = ActiveDocument.GetSheetObject("TB04")

obj.ExportBiff "D:\Kumar\New\New.xls"

End Sub

Sub QVD

set obj = ActiveDocument.GetSheetObject("TB04")

obj.ExportBiff "D:\Kumar\New\New.qvd"

End Sub

Sub XML

set obj = ActiveDocument.GetSheetObject("TB04")

obj.ExportXML "D:\Kumar\New\New.xml"

End Sub

Sub Text
set obj = ActiveDocument.GetSheetObject("TB04")
obj.Export "D:\Kumar\New\New.txt",","
End Sub

Sub HTML
set obj = ActiveDocument.GetSheetObject("TB04")
obj.ExportHTML "D:\Kumar\New\New.html"
End Sub





So, everything is working fine but what i want to do is how to save the file i ahave specified in the macro code according to the schedule like(for aparticular date and time).

I hope you understand my problem ,

If u know the solution or If u are not undersatand my problem respond me.

Waiting for ur response....

With Regards..........













1 Reply
christian77
Partner - Specialist
Partner - Specialist

Hi:

I think you could use triggers, after reload or something.

Other.

You can create a variable like: TheTime = hour(now())

Then go to triggers and set a trigger to execute your exporting macro every time the variable changes. In this case, every hour.

In your macro, add the next. (In the correct vb language-sintax)

If(TheTime=3,do it, do not)

This way, your macro will be executed at 3.

I guess, if the variable does not change until 4, it won´t execute it.

It's just a raw idea. You need to cook it more.