Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Can we use Commandline to Reduce Data in a QVW file?

Hi,
There is a requirement to open a qvw, reduce Data and save it using Command prompt. Can it be done without using macro?

Regards,

Dawar

5 Replies
MVP
MVP

Re: Can we use Commandline to Reduce Data in a QVW file?

You can reduce to no data using the /nodata parameter.

/nodata - open document without data (all objects and script and macros, no records)


But that's it, no more flexibility.

Not applicable

Re: Can we use Commandline to Reduce Data in a QVW file?

\nodata i believe will remove the variables and table structure too.. I dont want that to happen. Just a normal reduce data that we usually do from File option in UI..Also, don't want to reload the file.

Thanks

MVP & Luminary
MVP & Luminary

Re: Can we use Commandline to Reduce Data in a QVW file?

You could try this with a vbs-batch, like:

Option Explicit

Dim QA, QD, apppath, param1, newdoc  

apppath = "C:\test.qvw"

set QA = CreateObject("QlikTech.QlikView")

set QD = QA.ActiveDocument.GetApplication

set newdoc = QD.OpenDoc(apppath, "","")

      

newdoc.Fields("AnyField").Select "AnyValue" 'maybe a dummy-field within a loosen table

newdoc.ReduceData

newdoc.SaveAs "C:\test_Reduced.qvw"

newdoc.CloseDoc

QD.Quit   

- Marcus

trdandamudi
Honored Contributor II

Re: Can we use Commandline to Reduce Data in a QVW file?

I think the below link should help....

Remove data from qvw with command line

Partner
Partner

Re: Can we use Commandline to Reduce Data in a QVW file?

Vote for my idea : 😉