Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kevincousins
Contributor
Contributor

Importing Excel File From Dropbox (What to make File path in order to be able to open on all pics)

Hi Guys.

First post.

Have a shared folder on Dropbox.

With Excel Sheets in it.

There are currently 3 people on the shared folder.

I can only open the Qlikview Model on one of the 3 pcs.

The reason is because the file path is different.

So which ever pc I want to open it on I first have to change the file path.

All 3 of us need to be able to open the model at any time.

Can you please assist with the code required in order to solve this problem?

Really appreciate it.

8 Replies
Anonymous
Not applicable

Hi,

You can make a relative path according to the user.

So, you can do something like this in the script:

if( osuser() = 'user1') then

vPath = 'C:\Teste\';

else if (osuser() = 'user2') then

vPath = 'C:\Teste2\';

end if;


Load *

From [ $(vPath)\App.qvd] (qvd);


Regards,

kevincousins
Contributor
Contributor
Author

Hi Mauri,

Thanks so much for the feedback.

I have worked quite a bit on QlikView front end, however, I am not that familiar with the back end.

Still learning step for step.

Should this go in the main tab in the script?

Does this seem right to you? For some reason it's not working.

if(osuser() = 'user1') then
vPath = 'C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx';
else
if (osuser() = 'user2') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx';
else
if (osuser() = 'user3') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx';

end if;

Load *
From [ $(vPath)\Follow Ups (The Nets) V1.2.qvd] (qvd);

Appreciate your input.

Thank you!

pooja_prabhu_n
Creator III
Creator III

Hi,

Try this:

if(osuser() = 'user1') then
vPath = 'C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user2') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user3') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';

end if;

Load *
From [$(vPath)\Follow Ups 2018 07 24 (Zone 4).xlsx;

or

if(osuser() = 'user1') then
vPath = 'C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user2') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';
else
if (osuser() = 'user3') then
vPath = 'C:\Users\HP\Desktop\Dropbox\KBY Reporting\';

end if;

Load * [ $(vPath)\Follow Ups (The Nets) V1.2.qvd] (qvd);


In your expression, vPath has xlsx path and load in statement you are fetching the qvd.

Thanks,

Pooja

Anonymous
Not applicable

Hi, Kevin,

Yes, this go, in the main script tab.

So, I gonna try to explain the idea of the script.

What this script does is get your network user (osuser()) when you reload the applcation (qvw). Then according to the user, you can change path to access the xls or qvd.

Some correction, that you need to do:

First you have to check the osuser() in each PC, that you and your members are using. For that, you can create a text box in the application -> properties -> text-> =OsUser().

After that, you can adjust the expression according to the correponding values in each PC

if(osuser() = Put your osuser that you find on the text box) then

else
if (osuser() = Put the osuser of member 2) then

else
if (osuser() = Put user of member 3) then

end if;

The second part is adjust the vPath according to what Pooja Nagaraj said.

Because, in your script, you're trying to find a file in this path

C:\Users\Lenovo\Desktop\Dropbox\KBY Reporting\Follow Ups 2018 07 24 (Zone 4).xlsx\Follow Ups (The Nets) V1.2.qvd] (qvd)

Do you need to load the excel and the qvd?

Regards,

kevincousins
Contributor
Contributor
Author

Hi Bala Bhaskar,

Thank you for the link.

I'm working on this project after hours - sorry it has taken me long to reply. Feel like I hit a roadblock now. The design is easier for me then working on the script.

Thanks for your help.

I think I'm still unsure of the syntax and what order the code must be in.

I'll send another message explaining what I mean

kevincousins
Contributor
Contributor
Author

Thanks Pooja,

I think the script is still a bit overwhelming.

Design is easier for me.

Going to try out and get back to you

kevincousins
Contributor
Contributor
Author

Hi Mauri.

Thanks for your help. Really appreciate everyone's input!

I want to code this in a qlikview document which is pulling info from an excel sheet.

Sorry, I think it is a typo from my side. As far as I can see it should only be the excel sheet that loads.

Thank you