Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I wold like to know how to read an excel file as shown in the first screen-shot below as opposed to having the full file path (second screen-shot) and what is the difference between the two ways of reading an excel source.
The first one will have the 'relative paths' option ticked when loading the file, and also (as there is no additional path) the excel file is located in the same folder as the .qvw file.
The major difference is ease of use. A tip that's often used is to create a variable that holds your data path, and to use this instead, so regardless of where the document ends up being stored, it will always read the path correctly.
Alternatively, if you ensure your folder structure is always consistent in a dev or live set up, then when you move files, a relative path should ensure it finds the file as long as the paths are replicated - i.e. if you have a "Live" and "Dev" folder and then an "Apps" and "Data" folder in each, the relative path for the .qvw to find the excel file would be [../Data/[Your Data Source]] for both.
The first will find the file relative to the folder containing your QVW file, or from the folder set using the DIRECTORY statement if it exists. The second is an absolute file location (but local to your PC).
HTH
Jonathan
The first one will have the 'relative paths' option ticked when loading the file, and also (as there is no additional path) the excel file is located in the same folder as the .qvw file.
The major difference is ease of use. A tip that's often used is to create a variable that holds your data path, and to use this instead, so regardless of where the document ends up being stored, it will always read the path correctly.
Alternatively, if you ensure your folder structure is always consistent in a dev or live set up, then when you move files, a relative path should ensure it finds the file as long as the paths are replicated - i.e. if you have a "Live" and "Dev" folder and then an "Apps" and "Data" folder in each, the relative path for the .qvw to find the excel file would be [../Data/[Your Data Source]] for both.