Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Text File no download after reload (Automatically)

Hello,

I have a macro that download an txt file (Works Fine) when I do clic (open Qlikview and after reload the txt file apperas on the specific folder that I have created).

But I have to do this in automatic way, so I created a .bat that reload automatically the qlikview file. But the macro it seems not working.

This is my .bat

@echo off

cd C:\Server Qlikview\Desarrollo\qv_prod

echo Actualizando Datos

"C:\Program Files (x86)\QlikView\qv.exe" /r reload_file.qvw

What I have to do for that the macro run?

It can download a txt file with .bat?

Thanks!

21 Replies
whiteline
Master II
Master II

The quotes. You have to use the quotes as the path contains space symbol.

You'd better to check the qv.exe execution directly from command prompt and then place it into bat file.

pgalvezt
Specialist
Specialist
Author

.bat execute the other Qlikview ...everything good during the reload. The problem is the files no thrown in the folder. When I do clic in reload manual way the files .txt appears into the folder. simply it cant... when I try to thrown the files throught of the .bat

whiteline
Master II
Master II

Sorry, looks like you have to describe the whole chain.

I'm a little bit stuck about what is working and what is not.

pgalvezt
Specialist
Specialist
Author

OK,

I have a qlikview called test ok?

inside test I have a macro that thrown files .txt.

When I reload manually this qlikview thrown the files (No problem until now ok?)

But I have to do this automatically.

So I created 2 files:

First file:

a Qlikview called reload_1 that contain a buttom that reload the test qlikview. ok?

sub Recargar

   set App = ActiveDocument.GetApplication

   set myDoc = App.OpenDoc ("Folder\file_qvw.qvw","user","pass")

   myDoc.Reload

   myDoc.Save

   myDoc.CloseDoc

   set myDoc = nothing

   set App = nothing

end sub

Finally I have a .bat called reload_1 that execute reload_1_

@echo off

cd C:\Server Qlikview\Desarrollo\qv_prod

echo Actualizando Datos


"C:\Program Files (x86)\QlikView\qv.exe" /r /NoSecurity reload_file.qvw)


But in those steps qlikview is not thrown the txt files.


any hesitate just let me know.



whiteline
Master II
Master II

Ok.

Now before we start to investigate why the reload macro isn't working, have you tried to reload the first qvw file (test) directly from command line or bat file ?

I don't understand the reason for creating the second reload_1 qvw.

pgalvezt
Specialist
Specialist
Author

have you tried to reload the first qvw file (test) directly from command line or bat file ?


Yes, but qlikview asking me for user and pass. (how is the code in the .bat for user and pass directly)?


(I think is the only way because directly qlikview thrown the txt files)


I don't understand the reason for creating the second reload_1 qvw.

The reason is because I reload many qlikview at time (20 qlikview more or less)

pgalvezt
Specialist
Specialist
Author

Can I use

"C:\Program Files (x86)\QlikView\qv.exe" /r /USERID= user /NoSecurity reload_file.qvw)?

whiteline
Master II
Master II

Yes. That's what I'm talking about.

pgalvezt
Specialist
Specialist
Author

Dou you know how is the sintaxys to open a Qlikview document within user and pass.

Appears: Unknown command line option /USERID="admin"

whiteline
Master II
Master II

If you use NT credentails in Section access, you don't have to pass the user.

Otherewise, I don't know how to do that. There are some threads in the community about that.

Consider to use triggered EDX event on server.

You can trigger it with the command line (QMSEDX.exe) and pass the credentails.