+ Reply to Thread
Results 1 to 5 of 5

How to create a new modified connection when I make a copy of a pivot table?

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    35

    How to create a new modified connection when I make a copy of a pivot table?

    I have a pivot table which pulls data via a sql query. Let's call it 'Pivot Table 1' which has a Connection named 'Connection 1'. I want to make a copy of Pivot Table 1 (let's call that copy 'Pivot Table 2' ) and establish a new connection for it named 'Connection 2' and then modified the query in Connection 2 to pull slightly different data.

    However, when I create Pivot Table 2 and change the name of the connection string to 'Connection 2' at the top of the Connections dialog box and modify the query this also changes the connection to Pivot Table 1. Excel thinks I want to use the same connection for both pivot tables and that I am simply Changing from 'Connection 1' to 'Connection 2'.

    When this didn't work I then decided to create separate odc connection files for each pivot table by using a text editor on the Connection1.odc file and editing it to create a Connection2.odc file (I change the 'TITLE' and the Command Text). Now I'm trying to figure out how I can point each pivot table to its separate connection file.

    Can anyone help?

    Thanks
    Last edited by Rhino_dance; 10-20-2016 at 05:59 PM. Reason: typos

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: How to create a new modified connection when I make a copy of a pivot table?

    Hi Rhino_Dance,

    Did you try creating each Pivot separately from its separate source?
    Remember you are unique, like everyone else

  3. #3
    Registered User
    Join Date
    06-13-2012
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: How to create a new modified connection when I make a copy of a pivot table?

    Thanks for your response. No I didn't. I was trying to avoid that. I actually have a bunch of pivot tables that I want to create based on 'Pivot Table 1' and I wanted to avoid having to create each separately. However, when I make a copy of a sheet holding 'Pivot Table 1' the Pivot table on the new sheet is also named 'Pivot Table 1' by Excel. I thought it would be 'Pivot Table 2'. So I wasn't understanding that.

    Now I've now renamed this copy of 'Pivot Table 1' to 'Pivot Table 2'. So the two pivot tables have separate names. But 'Pivot Table 2' is still tied to 'Connection 1'. So how do I created a different connection for 'Pivot Table 2' where I can then assign a different query? Or is a pivot table permanently tied to the connection that it had when it was created?

    Thanks

  4. #4
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: How to create a new modified connection when I make a copy of a pivot table?

    Hi,

    Could you do a test of 2 queries set up separately to test this theory?

    I don't think renaming the Pivot or the Connection is making any difference to what's happening as you may be able to rename without changing any actual properties.

    Do a small test & if it works there's your problem, also you would only need to set this up once with your separate queries.

    Hope this helps.

  5. #5
    Registered User
    Join Date
    06-13-2012
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: How to create a new modified connection when I make a copy of a pivot table?

    I think you're right. Renaming the pivot is probably only useful for distinguishing it for the purposes of VBA code and such. It doesn't create a new pivot entity that can be assigned a new connection. Thanks
    Last edited by Rhino_dance; 10-26-2016 at 05:03 PM. Reason: typo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change pivot table data connection if current connection = x
    By BellyGas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2016, 06:05 AM
  2. How to make connection to other workbook's specific Table?
    By bristly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2013, 12:52 PM
  3. Replies: 0
    Last Post: 03-08-2013, 06:34 AM
  4. Create a pivot table template/master copy?
    By Monique Rebanks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2010, 04:04 PM
  5. pivot table connection to odbc
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2007, 12:49 PM
  6. Copy pivot table and get rid of connection
    By araki in forum Excel General
    Replies: 3
    Last Post: 03-07-2006, 09:10 PM
  7. Replies: 1
    Last Post: 02-21-2006, 12:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1