Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Members,
I have a QV script from which I daily import data. I want to schedule this task Please help me out with these simple things.
1. How to automatically update the file from which QV takes the data.
This is how it shows in script –
FROM
(txt, embedded labels);
I need it to update the date automatically so it can take the latest file.
2. After this need it to reload
3. Export the file into .csv format in some folder.
Do I need to make a BAT file to schedule it?? Or is this possible to schedule it from QV?? I do see an option of schedules in Document Properties.
I am very new in QV with very less background of coding. Your help will be much appreciated.
Let Export= 'Q:\bns\derivProdData\spreadsheets\GEF\VG\Extract\SBI Positions Extract Test'& $(vdt)&'.xls';
// you need to give some table name
Table1:
LOAD TransId as [TransID],
ReferenceAsset as [Reference Asset],
DividendPassThrough as [% Dividend],
FROM
Q:\bns\derivProdData\sybasePortfolio\GEF\positions\epsilon\GEF.ep.TRS.$(vdt).csv
(txt, embedded labels);
//$(Export)
//now store this table to a file
Store Table1 into Path/Filename.csv (txt);
Thanks Kumar
Just a Quick question - I am getting following Script Security pop up message (attached).
Anyway to give system access permanently ?
Also, I have used to some filters in the table via Current Selection.
How can I incorporate that in code ?
This has nothing to do with the previous discussion (and you should create a new thread about this). The message box tells you that an EXECUTE statement is being used in your load script and that the checkbox Script Editor->Bottom pane:Settings->Open Database in Read-Write mode has been enabled. These are serious extensions of typical security settings.
Do you really need to execute command line programs outside QlikView and to write to your DB? Then select "Give System Access"
Peter
Thanks Peter
Is there any way to store table only currently selected fields ?
What do you mean by "Currently selected fields"?
A simple STORE statement will create a QVD from the internal table with the fields you have loaded.
An extended STORE only dumps the fields you name into the QVD.
Peter
I mean if I have a data for 4 companies and I want to select only for 1 company.
I was searching few more threads. I saw someone suggesting to use -
use variable like v1 with expression
=(SubField(GetcurrentSelections(),':',-1)) // for particular selection
If you don't want the data for the other three companies, then add a WHERE clause to your script and do not load their data.
Peter
If you want to store the data for companies you selected in the User Interface, you can't do this with a STORE statement, as a STORE writes an internal table to disk including all selected and unselected companies.
On the other hand, in the UI you can use the rightmousemenu and select export. That option offers you to export the data from the currently selected object/chart/table box/list box in a variety of file formats. Such an export will only write the data that is associated with the currently selected company.
Peter
Can you provide me an example how to use where clause ?