Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Accessing non-QV file metadata on load

When loading data from a non .QVD file - for example an Excel spreadsheet - is it possible to access the file's metadata?

In particular I'd like to be able to access and display the file's Last Modified date.

This would give the user confidence that the data they're viewing is the most up to date.

6 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

You can use

QvdCreateTime('C:\MyDir\MyFile.qvd')

and

filetime( 'xyz.xls' )




gauravkhare
Creator II
Creator II

Dear SparkleHorse,

what will you get by accessing the matadata info?????????????????

Actually how this idea came into your mind!

you want to tell the users the last modified time. Then simply do- Take a text object and write-last Modified date&'time(reload(time))'.. this will give a clear picture about the last reload time.

Not applicable
Author

Thanks Deepak.

FileTime() is exactly what I was looking for.

Not applicable
Author

Gaurav,

I dont want to display the last time the QVD was created or loaded - this is performed every night. I want to display the last time the source file was updated.

Deepak has given me the answer I needed.

Not applicable
Author

I now have a slight problem with this.

If I load from an .XLS file from a network folder everything works fine and I can see the Last Modified Date by using the FileTime() method.

However, my problem is that the .XLS file I am loading from is hosted in Sharepoint and is accessed via a URL (rather than a UNC path). In this scenario I am not getting any information back from FileTime(). I have tried two methods:

1) LOAD *, FileTime() AS LastModifiedTime FROM '<url>' (biff);

2) LET lastModifiedTime = FileTime('<url>');

Is this a known issue? Does anyone have any suggestions?

Thanks

Jon

Not applicable
Author

Hello Jon,

I am having exactly the same issue: I get a NULL value when trying to get the last modified file from Sharepoint.

Seems as if "Filetime()" function only works for local files, but not for files stored in a server.

Does anybody managed to obtain this info by other ways?

Thanks!

Jon Ander