Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

How to take back up of editscript code

Hi,

- I want to keep editscript code in one file.

- How to generate qvs file and use it?

- I need Steps to create qvs file and use it.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

In your script editor screen, go to File, Export to Script File... and browse your computer to store the file.

Although the file is by default saved as *.QVS file, it can be read with notepad or any other tool to read plain text.

In the new document when you want to use any previously exported script, go to the Script Editor, File, Open External Script file and you are done.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

14 Replies
Miguel_Angel_Baeyens

Hello,

In your script editor screen, go to File, Export to Script File... and browse your computer to store the file.

Although the file is by default saved as *.QVS file, it can be read with notepad or any other tool to read plain text.

In the new document when you want to use any previously exported script, go to the Script Editor, File, Open External Script file and you are done.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Thanks a lot Miguel....

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Hi Miguel,

- I had a qvw file with edit script.

- In front end  i'll take a button in sheet. When i click this button the editscrpit code should stored in qvs file of location folder.

How can i solve this problem from front end.

Miguel_Angel_Baeyens

Hi,

You can create a new button, and use the following macro code (among many other sample codes)

Sub SaveScript

     Set docProps = ActiveDocument.GetProperties

     docScript = docProps.Script

     ''MsgBox(docScript)

     Set objFSO = CreateObject("Scripting.FileSystemObject")

     Set objFile = objFSO.CreateTextFile("C:\ScriptFile.txt")

     objFile.Write(docScript)

     objFile.Close

End Sub

That will save all your script code to the file specified.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Miguel,

Superb code Thanks a lot.

Actually I posted this task in community put i didn't get any solution. So, i forward to you b'coz you have given me solution previously to create qvs file.

Really thanks a lot...............

Not applicable

Hi,

How can i pass the qvs file to another Qlikview by using macro code from existing QVW file.

Thanks in advance

Miguel_Angel_Baeyens

Hello,

Can you please elaborate on your exact requirements and what do you mean by "pass the qvs file to another QlikView"? If you already have a QVS file you don't need any macros, just the following line at the beginning of your script

$(include=file.qvs);

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable

Hi,

I am trying to create a new QVW file from Current Qvw file by using macro.

When i click on "Create QVW" button then it will create a new QVW file. Ceating the new QVW file and passing the QVS File by using Macro.

After creating the new QVW file , then in Edit Script should have the qvs script  for newly created QVW file.

How to pass the QVS File to Newly Created QVW File.

Now you understand what i trying to achieve.

Thanks

Not applicable

HI Miguel,

Any macro code for creating new file and then loading the existed qvs file ?

Thanks in advance.