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: 
don_qlikview
Creator
Creator

Saving one file multiple times

Hello Everyone,

I have a file that comes out 5 different times in the day and every time when it comes out, it replaces the previous file. For example File1.xlsx comes out at 11:00 AM then again it is replaced by File1.xlsx at 1:00 PM and so on. So, my question is how do I save these files as I have to do a subtraction of 1:00 PM – 11:00 AM and so on… Also I have a field in the file that is called “Generated time” and it gives the date and time in the format 1/31/2014 11:00:00 AM. Can anyone help me with this?

Thanks!!!

8 Replies
Clever_Anjos
Employee
Employee

Which process is generating those files?

don_qlikview
Creator
Creator
Author

It's coming out of SAP and it seems they cannot change the file name or do anything!!!

ashwanin
Specialist
Specialist

I think you have to do some modification in the Script /Macro from where this file is reloading. Check that what is the output format of that. Might be You have to change that

Anonymous
Not applicable

Don

Why not load each SAP file into QlikView when they arrive and then store each one into a QVD named with suffix of date and hour derived from your “Generated time” field.

Then with another qvw you can load the QVD's you need and transform them as per your needs.

Best Regards,     Bill

Not applicable

Hi Don,

If you know the exact schedule time the file is being downloaded from SAP, then I suggest you to make a QVD file after it finished its process and naming this QVD file something like this:

Let TimeStamp = now();

SAP_Excel:

Load

  A,

  B,

  C,

  D,

  E,

  F,

  G,

  H

From

[..\File1.xlsx]

(ooxml, explicit labels , header is 1 lines,table is [Table1]);

Store SAP_Excel into [..\qvdDestination\SAP_Excel_$(TimeStamp ).QVD];

Drop Table SAP_Excel ;

ashwanin
Specialist
Specialist

Don, Suggestion of Bill sounds great. You can do it by this method.

don_qlikview
Creator
Creator
Author

Here is the sample data that I am getting

Generated TimeNameIDSales
1/31/2014 10:20abc1100
1/31/2014 10:20afsd2200
1/31/2014 10:20dfad330
1/31/2014 10:20asdfg44748
1/31/2014 10:20gwd5544
1/31/2014 10:20age699

So, the generated time changes every two hours, the next time it becomes 1/31/2014 12:20:00 PM, so if I store it in qvd how should I write the condition for saving it?

don_qlikview
Creator
Creator
Author

Can you give me an example of how I can do this.