Change PivotTable data source without validating the connection - excel

I've developing a solution for a client that includes an Excel template with a PivotTable. The PivotTable's data source is a query against a SQL Server. Before I send the template to my client, I'd like to change the connection string to reference my client's SQL Server instead of my local server. The problem is, that connection string doesn't work on my computer, so Excel throws an error when I try to edit the connection and won't save the new connection string.
What's really frustrating about this is that I somehow did this successfully about a week ago, but can't remember how. I have a version of the spreadsheet that I successfully created with the external connection string. Unfortunately, I had to make a change to the query, and trying to make that change to the existing spreadsheet results in the same problem -- Excel tries to connect to the data source to validate the query, and fails to do so.
How can I change the connection string without Excel trying to refresh the data? I know it can be done, because I've done it, but I have no idea what I did!

You will be able to suppress the auto-refresh by setting the .EnableRefresh = False property of your PivotCache.
However, you will need to somehow reset the property to True upon start of your spreadsheet or delivery to the client, else the pivot table won't be able to refresh at all.

Related

Connecting an Access Database to Excel using an OLEDB Connection

I am wondering if anyone can help me? I have no real clue on how to do what I am attempting and I am just guessing based off the bits of information I have.
We use Microsoft Access to pull information out of our Trading program, we set this up via a DSN using an ODBC Connection.
We then pull the information out of Access into Excel. We have always gotten data from the Access databases as a Connection rather than a query if that makes sense? This way we can keep amending the Connection String and The command text to suit where as if you get the data via a query the options are greyed out in the connection properties in excel (I hope that sentence makes sense)
I need to add a second connection to an excel workbook, to get queries from two different databases, however I am struggling to create a connection from scratch, where for the last 12 years we have just been amending an existing connection and saving the spreadsheet under a new name no one here knows how to create a new connection.
I have tried the following > Get Data > From Database > From Microsoft Access Database
This imports but I am unable to change the SQL command text so its no good.
I am trying to add a connection via OLEDB using the following Connection String
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Database\Dormant Accounts.mdb;Driver={Microsoft Access Driver (.mdb)};*
But I am getting the error Details: "OLE DB: Could not find installable ISAM."
Microsoft Access Database Engine 2010 is installed, I have been googling all morning trying to find answers to this question but I am having no joy, Does anyone have any ideas how I can get this to work?
If it helps, the connection string we always copy and amend from is the following
DBQ=C:\Database\Revenue Report.mdb;DefaultDir=C:\Database;Driver={Microsoft Access Driver (.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;*
The only changing variable would be the file name, this works but I have no idea what the provider is or if this was even set up as an OLEDB connection.
Any help would be greatly appreciated, please let me know if you would need any more info

How to create a live excel connection to Redshift

I want to be able to connect excel with redshift.
So when I refresh this live connection in excel, it will refresh the query I write in redshift and return the newest result in excel.
I used to do it in a SQL Server using a stored procedure, and connect SQL Server with Excel using legacy wizard (under the get data option in data tab) - in the connection I specify the stored procedure, so every time I refresh Excel, it will fetch the updated result from SQL Server.
But now the company is using db visualizer to connect to redshift. I am not sure how to use the wizard to connect to Excel; do I need to use VBA? Any tips are welcome!
dbvisualiser is just an IDE that can point to redshift. it has no bearing on what you are trying to achieve.
you need to set up a link from excel through ODBC to Redshift. for that you need you redshift
host name
port
user name
password
You would also need these things to connect through dbvisualiser
to get connected - you could follow the instructions here
https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html

Save connection to Oracle database

Is there any relatively easy way to save connections to Oracle database in Excel?
When I save Excel file with imported data from oOracle I can see connections and refresh data in sheets. But if somebody else is trying to refresh data, they get a pop-up about missing connection.

how to use different database with same table structure in typed dataset xsd

I'm confused how to explain myself well here is my scenario.
I have a database named "database1" and i have used typed dataset in visual studio and have added more than 200 stored procedures in the table adapters.
it is a desktop based application. now i want to deployee the same software in other school same database but i have changed the database name
when i generate new database from query and write all the stored procedures in the database and change the database name in the connection string it doesn't work.
I'd recommend you don't change the database name, or if it's something specific to the first client (like ParisTechnicalCollegeDatabase), change it now to something generic (SchoolManager) so you never have to change it again. There's no specific problem I can think of regards reusing a typed dataSet on a different database: I do it daily on database that aren't clones of each other. Ensure your second server is set up with a user and default schema that is specified in the connection string. The problem will eithe per be faulty connection string or incorrect database setup, not the fault of the dataSet
For more targeted help, post up the error messages that appear when you try to run your app on the new database

How to connect to oracle 9i database from excel?

I am working on oracle database.
I am using toad for that.
DB is in remote location say in IP 198.0.0.0
with user name as 'aaa' pwd as 'xxx'
I want to connect my DB to excel.
So that I can run query and get the results directly in excel.
Can I do that in excel 2003.?
If I can do, how to do connection.
I tried with Data - > Import external data - >New database query
It is not working
Thanks for your help,
I did googling.I didn't get help
You need to have an ODBC data source set up already and use that as your data source in Excel. The ODBC connection in turn points to your database. Of course this all assumes a properly installed Oracle client which is sounds like you have if you are able to use Toad, login and issue queries and see results.

Resources