Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Excel GuRu
 
Posts: n/a
Default Query of External Data

I'm using a ODBC connection to query a oracle database. If I refresh a query
and email the file to the intended recipients, I can limit what they can see
by changing the query to include/exclude certaing markets.

Is there a way that I can set up the query so the recipient cannot edit the
query and have access to all the data...?

Or is there a way to disconnect the query from the excel file, this way the
query could never be refreshed to the database. We could email them the file
daily, but they wouldn't be able to refresh or change the query(to view
markets they normally wouldn't have access to).

I'm using a pivot table to summarize the data and would prefer to not have
set that up repeatedly.
  #2   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You can delete the underlying query table.

Manually, or programmatically --
Create a copy of the workbook
Select the sheet that contains the query results
Select a cell in the table
Delete the query table:
Manually -- on the External Data toolbar, click the
Data Range Properties button
Remove the check mark from 'Save query definition'
Click OK
Programmatically -- add code similar to the following:
Dim qt As QueryTable
For Each qt In ActiveSheet.QueryTables
qt.Delete
Next qt


Excel GuRu wrote:
I'm using a ODBC connection to query a oracle database. If I refresh a query
and email the file to the intended recipients, I can limit what they can see
by changing the query to include/exclude certaing markets.

Is there a way that I can set up the query so the recipient cannot edit the
query and have access to all the data...?

Or is there a way to disconnect the query from the excel file, this way the
query could never be refreshed to the database. We could email them the file
daily, but they wouldn't be able to refresh or change the query(to view
markets they normally wouldn't have access to).

I'm using a pivot table to summarize the data and would prefer to not have
set that up repeatedly.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Excel GuRu
 
Posts: n/a
Default

Thank you Debra.....

"Debra Dalgleish" wrote:

You can delete the underlying query table.

Manually, or programmatically --
Create a copy of the workbook
Select the sheet that contains the query results
Select a cell in the table
Delete the query table:
Manually -- on the External Data toolbar, click the
Data Range Properties button
Remove the check mark from 'Save query definition'
Click OK
Programmatically -- add code similar to the following:
Dim qt As QueryTable
For Each qt In ActiveSheet.QueryTables
qt.Delete
Next qt


Excel GuRu wrote:
I'm using a ODBC connection to query a oracle database. If I refresh a query
and email the file to the intended recipients, I can limit what they can see
by changing the query to include/exclude certaing markets.

Is there a way that I can set up the query so the recipient cannot edit the
query and have access to all the data...?

Or is there a way to disconnect the query from the excel file, this way the
query could never be refreshed to the database. We could email them the file
daily, but they wouldn't be able to refresh or change the query(to view
markets they normally wouldn't have access to).

I'm using a pivot table to summarize the data and would prefer to not have
set that up repeatedly.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Microsoft Query data in a pivot table. slapana Charts and Charting in Excel 0 January 11th 05 05:03 PM
Fetching External Data from Excel Sri Excel Discussion (Misc queries) 2 January 3rd 05 11:46 AM
Relative paths to external data? Christopher Blue Excel Discussion (Misc queries) 3 January 1st 05 08:14 PM
Pivot Tables referring to external data query Excel GuRu Excel Discussion (Misc queries) 4 December 29th 04 06:29 PM
DSUM and other functions on External data Peter Excel Discussion (Misc queries) 1 December 22nd 04 12:31 PM


All times are GMT +1. The time now is 02:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"