Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

diwaskarki
Not applicable

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
Not applicable

Re: dynamically loading excel file

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

      Load / read from this location.

-          Else

     Load / read from this location

end if

I hope this helps,

Luis

luismadriz
Not applicable

Re: dynamically loading excel file

diwaskarki
Not applicable

Re: dynamically loading excel file

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)