Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
diwaskarki
Creator II
Creator II

dynamically loading excel file

Hi , I have an excel file in a drive, which I am loading to create a qvd table.

When I push the code to my production environment, the hardcoded path for the excel file wont work.

So, I need to do something like this.

If(ComputerName() like 'WP*') then

       read from this location.

-          Else

   read from this location.

How can I do this? Thanks

3 Replies
luismadriz
Specialist
Specialist

If wildmatch(ComputerName(), 'WP*') =1 then

      Load / read from this location.

-          Else

     Load / read from this location

end if

I hope this helps,

Luis

diwaskarki
Creator II
Creator II
Author

Luis,

you are correct. For people who are having a similar issue. You need to do what Luis Said. Here is my code:

If wildmatch( ComputerName(), 'WP*' ) , then

LET variablename =  \\wvsdppx1\......\...........;

ELSE

LET variablename = \\.......\\......;

ENDIF

Then on your load statement do FROM $(variableName)