Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Does anyone know if there is a way to remove data from a qvw with a command line but by keeping the field names.
I have tried the following...
C:\Program Files\QlikView\qv.exe /nodata C:\Folder\File.qvw
but this removes ALL data including field names which then loses all field formats set in the document properties.
I basically want a way of doing the same thing as FILE>REDUCE DATA>REMOVE ALL VALUES but with a command line instead.
Does anyone know a way?
Thanks
Perhaps with a vbscript script file
Set MyApp = CreateObject("QlikTech.QlikView")
Set MyDoc = MyApp.OpenDocEx("D:\MyFile.qvw",0,False)
MyDoc.ReduceData
MyDoc.SaveAs("D:\MyFile.qvw")
MyDoc.CloseDoc
Set MyApp = Nothing
Hi,
Thanks for your reply.
I don't know what i am doing wrong (im not very good with vbscript).
the vbscript seems to open and save the file but it doesnt do any reduction..
Is there any chance you could take a look to see if there is anything obvious that i am doing wrong please?
I have attached a sample file.
Many thanks
Does anyone have any ideas please?:)
Add FIRST 1000 before the LOAD script and it will only load the first 1000 rows
like this
Hi Alan,
Thanks for your reply.
we need this to run automatically in our backup routine. so limiting the load to 1000 rows is not possible.
the vbs option that Gysbert suggested is perfect but can't get it to work.
Does anyone else know how i could do this please? or maybe perform a limitied load via a command line / vbs?
Any ideas?
Well, it would be perfect if you could tell that function to clear all the data. What it actually seems to do is remove the data that isn't selected. I suppose you could add a bogus value to one of the tables, select that value and then reduce the data so only the bogus value remains. Not exactly perfect unfortunately.
Thanks for your help on this Gysbert. i will try that