Question : Dynamic Excel Web Query

I have a web application that displays personal data that is related to the user that is logged on to the application. In other words, when John logs on to the app, he will only see his personal data, and when Mary is logged on, she is able to see only her personal data. Other users' data is not accessible.

A SQL Server db provides the data for the web application. The application is very simple, the user is required to put in a valid username and password and on successful login, the user is able to use the web app to interogate the db (for relevant personal data).

Now, what I want to do is that from Excel, I want to create a new Web Query (Data|Import External Data|New Web Query). Selecting New Web Query brings up our local intranet page, on which a there is a link to my web application.

Clicking on this link (to the app) brings up a app's login screen. Putting in the correct account details bring up the first page of the web app. I then select a number of segments (mostly tables) from this page (by clicking the arrows to the left of each segment on the page, and then click on the Import button.

I now have the selected segments from my web app imported to my Excel spreadsheet (to a nominated cell) and then I save this excel file.

I then want to send this Excel file to another user who has access to my web application. What I want this Excel file to do is that on refreshing the data in it (Right-Click on worksheet then select Refersh Data) I want it to prompt the (other) user for a login/password and then automatically refresh the content of the Excel file with the data that belongs to the new user.

How can I do this?

Please note that I have never done this before and so I would appreciate a bit of clarity.

Thankyou.

Answer : Dynamic Excel Web Query

rmission,
You should do exactly as you have written, with one important change:
Right click on the imported data and select "Data range properties".
Select "Refresh data on file open", AND "Remove external data from worksheet before saving".
You do not want users to see other people's data, do you?

Now you can save the Excel file and distribute it to all of the users.


ShalomC
Random Solutions  
 
programming4us programming4us