Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hey all,
Is it possible to return the date of modification of a 'xls' file where my database comes from ?
I tried to use the FileTime() function but needs to use alib reference so it does not work.
Thx,
Rémi
 mohsinqlik
		
			mohsinqlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Filetime() should give modification time ...... what you mean by alib reference ?
 
					
				
		
 santiago_respan
		
			santiago_respanHi Rémi,
this macro will do it, but you must configure Module Security for Qv app as follows:
Below the macro:
Sub PrintFileChangeDate()
  Dim strTemp
  Dim fso
  Dim fileTemp
  Dim strDate
  ' Open library of Microsoft Scripting Runtime
  Set fso = CreateObject("Scripting.FileSystemObject")
  'This is the file we want to check
  strTemp = Trim("C:\FILE_DIR\MY_FILE.xlsx")
  If (fso.FileExists(strTemp)) Then
       ' Check All files in the folder
       Set fileTemp = fso.GetFile(strTemp)
       msgbox fileTemp.DateLastModified
  End If
End Sub
Let me know if this helps.
Kindest regards,
 
					
				
		
Thx all for your answers!
Actually I am litterally a newbie wtih Qlik sense. Can I use tis kind of macro directly in the Qlik script sheets?
As the FileSize() function, someone from the community said me thaht I need a lib reference tu sue the function. Unfortunately, I did not take time yet to understand well what does it mean.
