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

Export Scripts from multiple QVW files

Hi all - 

Is there a quick way to export the scripts from multiple files? I know to export them one by one by going to the edit script and then exporting it out. Can this be done programmatically for multiple qvws so that we don't have to be export them one by one?

To give a brief background, I am looking for a SQL query that might be running in one of the 100-150 qvw files that we have and although I have looked through the log file, I have seen that not all SQL queries are logged into the log file. If I were to export the log files from all the dashboards, I can very easily use NotePad++ to look through them to find the keywords from the query.

Now that you know what I am trying to do, may be there is another efficient way to find out what I am looking for? I am open for suggestions.

@rwunderlich@marcus_sommer

Thanks,
Sunny

Labels (1)
17 Replies
m_woolf
Master II
Master II

Sunny,

This is messy.

The forum wouldn't let me attach a vbs file, so I had to zip the file.

The attached vbs will load all qvws in a folder structure and export the script to a text file of the same name.

Line 3 sets the target folder for the qvws and line 4 sets the folder for the text files.

You should open an instance of QV first. Then execute the vbscript. Once it is started, the only way to stop it is to open the task manager and end the wscript.exe process.

Backup up you system.ini file, because this process will mess up your recent file list.

Sorry for the messy solution. Hope it helps.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't know how you all missed the tool:

Qlikview Cookbook: Script Repository http://qlikviewcookbook.com/recipes/download-info/script-repository/

The Script Repository tool will extract the script from an entire set(s) of QVWs and give you a search UI as well.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

P.S. If you came to a recent Masters Summit you would know all about this stuff 🙂

sunny_talwar
Author

I have been re configuring the Macro behind Document Analyzer for the last couple of hours :). I was able to store the script for one qvw, the next step was to loop over it somehow :).

Now that I have your app, it will save me ton loads of time. Thank you Rob!!

Best,
Sunny

varunqvmm
Contributor III
Contributor III

Hello,

Is there any way to export all the QVW files/documents from workspace  to some specific file folder location through script.And can u help me understand how the data sources are used / connected in specific sheets of a document i.e link  in between them.I have a requirement where i want to know which data sources are used in which sheet.And i explored the document summary xml format in QVW file but i didn't got any link between them. 

Thanks ,

Varun

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

As mentioned above Rob's tool for the exporting of the load script is the best start point:

https://qlikviewcookbook.com/tools/#squelch-taas-accordion-shortcode-content-9

You probably then want to look at creating Project folders for each app and then looking at the XML. Not sure this will give you the relationship between data and sheet.

Each app though should ideally be based on a single data model, rather than having different sheets showing different data. Separate apps would make more sense for that.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The only tool I know that can tie sheet objects back to data sources is the NodeGraph product https://www.nodegraph.se/

-Rob

varunqvmm
Contributor III
Contributor III

Hi ,

Thank you for your quick response  ,but i want to get the information using QVW files or any of the QlikView related files itself, rather than using separate product.Is this possible using the JavaScript or Java kind of API's,if possible please provide the sample code.

And  can a licensed version of QVW file contains this information i.e. link between the sheet and data source when opened in notepad++. Example : lets say i have 3 data sources which are csv ,excel and some sql run through LOAD function .Csv file data source used in sheet 1 and excel data used in sheet 2 ,i want to know this information through some kind of export functionality.

Thanks ,

Varun

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

QVW files contain information (with some limitations) about data sources at the file or DB table level.  Sheet objects use Fields in the data model. Making an accurate association between a data model Field and it's source file is difficult work and there is nothing automatic.  This is the hard work that vendors like NodeGraph have done.

-Rob