Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
is it possible to scan script in all .qvw files to search a specific string ?
If you export all the scripts first in some directory as qvs files (kind off like text files)
Hi Olivier, There are couple of options. Reading the qvw script from Log file generated after qvw reload or export the qlikview script .qvs files into one directory. For scanning you need to write the batch file or vbs file.
Here a possibility to scanning scripts through a macro - in this case with writing in a text-file, but you could check each script-part with a instr() to your search-string.
set doc = ActiveDocument
set obj = doc.GetSheetObject("TB04") 'Tabellenbox der Anwendungen
for iRow = 1 to obj.GetRowCount - 1 'von Zeile 1 bis zur letzten Zeile
set app = obj.GetCell(iRow, 0) 'applications
set path = obj.GetCell(iRow, 1) 'path
set newApp = ActiveDocument.GetApplication
set newdoc = newApp.OpenDoc (path.Text & "\" & app.Text,"","")
set prop = newdoc.GetProperties
script = prop.Script 'LoadScript Variable zuweisen
set fso = CreateObject("Scripting.FileSystemObject") 'FileSystemObject erstellen
set File = fso.OpenTextFile(FilePath & "\LoadScripte\" & "LoadScript_" & app.Text & stamp & typ, 2, true) 'txt-File schreibend öffnen
File.Writeline script 'Variable in txt-File schreiben
File.Close 'txt-File schließen
next
- Marcus