Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Each day I have several files with time stamps in the name (data-YYYYMMDD-hhmmss.csv) and sometimes without time stamp so I cannot use loops or something to select the files via name, because the names change day by day, and sometimes I have files created manually with other names.
It is possible to create a file explorer within QV to select the files? Maybe like the file explorer in Windows where I can select and double click.
Thanks in advanced
Thomas
Hello,
If the files have the same structure of data, looping is not accurate.
You must use the special character "* ".
Categoria:
LOAD CategoriaID,
[Nome Categoria],
Descricao
FROM *.csv
(txt, utf8, embedded labels, delimiter is ';', msq);
Hello,
If the files have the same structure of data, looping is not accurate.
You must use the special character "* ".
Categoria:
LOAD CategoriaID,
[Nome Categoria],
Descricao
FROM *.csv
(txt, utf8, embedded labels, delimiter is ';', msq);
Thanks.
Thats also a solution, I can use that.
But there is no file-explorer to click and select?
You may call the File-Dialogue via API in a macro, e.g.:
' ================================== Read FileName of Rate-File
SUB GetFileName_Rates
ON ERROR RESUME NEXT
SET oFSO = CreateObject("UserAccounts.CommonDialog")
oFSO.Filter = "Excel-Files (*.xls)|*.xls"
InitFSO = oFSO.ShowOpen
IF InitFSO = FALSE THEN
MSGBOX "Please select a file!", vbInformation, "Select Excel-File"
ELSE
ActiveDocument.GetVariable("sRates").SetContent oFSO.FileName, TRUE
MSGBOX "File selected: "&oFSO.FileName, vbInformation, "Rates"
END IF
END SUB
' ===================================================================
In the above there is only one Filename selected (and handed over into a variable), but the file-dialogue also supports multiple Files - you may have to dig a bit into VB probably.
HTH
Peter