Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
I've got this need.
I would like to export all the script of my qlikview file into a txt file.
What do you suggest me ?
Thanks
Forgot to mention that the script is generating the file into "C:\Script\Test.txt"
You have to create the folder or change it in the macro section in qlivkiew "Tools -> Edit Module";
Use the attached QVW.
Felipe.
Is there a command in the script that I can use in the top of the script for my need ?
Hi Marco,
When you enter the script editor (CTRL+E), theres an option, under File -> Export to Script File that makes what you need.
This will export it to a qvs file or txt.
Felipe.
Nice but I'd like to automatize this operation.
Is there a syntax that I can use in the top of the script to export the whole script below ?
P.S. Sorry for my English
Hi Marco,
See the attached QVW.
It uses a macro, as follows:
sub writeScriptToFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Users\eferibe\Desktop\Test.txt", 2,True)
objFile.Write(ActiveDocument.GetProperties.Script)
objFile.Close()
end sub
You can create a task (if you have Qlik Server) to automate the task.
Felipe.
What do you think if the txt result is this:
///$tab Main
???
It's a comment that's just stating in which tab it is.
I've added two more tabs, and it's the same for the others, so you can differentiate between the tabs in Qlikview.
It's just a tag actually.
Felipe.
Hi Marco,
Try this Macro, you should change the path used in the variable.
After saving the macro, you can create a button to execute it.
Forgot to mention that the script is generating the file into "C:\Script\Test.txt"
You have to create the folder or change it in the macro section in qlivkiew "Tools -> Edit Module";
Use the attached QVW.
Felipe.
which is the variable I have to change ?
Thanks