All Questions
Tagged with connection-string excel
179
questions
42
votes
8
answers
202k
views
Error: "Could Not Find Installable ISAM"
I've written some VBA code in an Excel workbook to retrieve data from an Access database in the same directory on a desktop. It works fine on my machine and several other machines running Windows XP, ...
12
votes
4
answers
93k
views
Excel VBA - connect to sql with a trusted connection (no uid/pwd)
Is there a way to have Excel connect to Sql Server using the current user's network windows authentication (trusted connection/integrated security)? I don't want to rely on a sql login or have a uid/...
7
votes
2
answers
14k
views
How to set "Application Name" in ADODB connection string
In .NET I simply use Application Name = MyApp inside the connection string, but when using ADO connection through VBA the Activity Monitor of the SQL Server Management Studio always shows Microsoft ...
7
votes
1
answer
50k
views
Microsoft Excel Data Connections - Alter Connection String through VBA
I have a fairly straightforward question. I am trying to find a way to alter and change a connection string for an existing data connection in an excel workbook through VBA (macro code). The main ...
7
votes
1
answer
4k
views
Excel Workbook connections field "Last refreshed" always empty
in Excel 2010, under Data-Connections where there is a list of all connections in the workbook, there is a field "Last Refreshed". This field is always empty for me. Microsoft says (http://office....
7
votes
1
answer
53k
views
Setting an ODBC connection string in VBA
I have created a macro that sends a new CommandText to an ODBC Connection in my Excel spreadsheet and then refreshes the table of results associated with the query. This has been working fine, but I'...
6
votes
2
answers
28k
views
What is the default value of IMEX in OLEDB?
string strConn = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" + filename + ";Extended Properties=\"Excel 12.0 Xml;HDR=Yes;IMEX=1\";";
I search on google, and got no results. I think the default ...
6
votes
4
answers
15k
views
Excel Data Connection Locks Access DB, Prevents Second Connection's Refresh
I have two data connections to different queries in the same Access DB. The second one always fails (regardless of which I run first).
When I look at the database, I notice that it has a lock file, ...
5
votes
2
answers
8k
views
MSOLEDBSQL Causes Error 3706: Provider Cannot Be Found
A client has for many years been using an Excel VBA application to interact with a SQL database. Recently the database has been upgraded from TLS 1.0 to TLS 1.2, which caused the connection from VBA ...
5
votes
3
answers
5k
views
Read an in-memory Excel file (byte array) with ADO.NET?
I want to use ADO.net to extract some data from an Excel file. This process is pretty well documented on the internet. My catch is that my file has been uploaded by a user, and so exists only as a ...
4
votes
2
answers
65k
views
Connection string for SQL Server 2014 Express (VBA)
I am trying figure out what needs to go in the connection string for SQL server via VBA.
This is the code I have right now,
Sub ConnectSqlServer()
Dim conn As ADODB.Connection
Dim rs As ...
4
votes
2
answers
5k
views
Find locations where connections are used Excel VBA
I have a raft of Excel 2013 workbooks that I have to refine, each with multiple sheets and multiple data connections and I am looking for a quick way to list:
connection name
connection string
...
4
votes
1
answer
4k
views
ADO - how to select column from xls file where two or more columns have the same name?
I have an excel file like this:
| | A | B | C | D |
| 1 | Name 1 | Name 2 | Name 3 | Name 2 |
| 2 | Data | Data | Data | Data |
| 3 | Data | Data | Data | ...
3
votes
3
answers
7k
views
OleDb Connection not reading all the rows from excel file
I am using an OleDb in C# connection to read data from an Excel sheet. And fill it in a Datatable.
The sheet contains 275 rows and 27 columns. After I read it, Rows 1,2 and 3 are empty. All the other ...
3
votes
1
answer
15k
views
Oracle ODBC TNS-less connection string (for 64-bit Excel)
Is there a 64-bit Oracle ODBC driver that supports TNS-less connection (or EZ-Connect) convention? I used to use "Microsoft ODBC for Oracle" which allowed a TNS-less connection string, but that has ...
3
votes
3
answers
41k
views
Excel VBA; Updating a connection string
I'm just trying to get VBA to update an OLEDB connection string. When I step through the code, I don't get any errors but the connection refresh fails and when I examine the connection string in the ...
3
votes
1
answer
138
views
Which provider should I select to connect to Excel version 11 through AdoConnection?
I need to connect to Excel table through TADOConnection, and I don't know what to write into the ConnectionString property. For Excel Version 8 I use Jet, for 12 I use ACE, what about 11?
And how ...
3
votes
1
answer
2k
views
Excel internal database connection
I built a data entry UserForm to populate a worksheet that will serve as the raw database. The raw data requires further manipulation and analysis in order to be reported, so I set up a database ...
3
votes
0
answers
2k
views
Prevent opening data sources Read-only when refreshing pivot table with external connection
Normally I have all my questions answerred with topics from Stack Overflow, but now I ran into some difficulty to which I cannot find me a working answer.
Brief explanation what I am trying to ...
3
votes
1
answer
4k
views
Excel Data Connection to Active Directory [closed]
I want to create a data connection in excel-2007 that pulls the result of an active-directory query into a sheet in my workbook.
I see that I can do this with VBA but I agree with Rob here that it ...
2
votes
3
answers
35k
views
ADODB Connection String for .csv
I want to process .csv files with ADODB in Excel VBA. I tried a few strings found on web, but none of them seems to work. I'm getting file path using:
strVFile = Application.GetOpenFilename("CSV (*....
2
votes
3
answers
51k
views
Excel macro to change external data query connections - e.g. point from one database to another
I'm looking for a macro/vbs to update all the external data query connections to point at a different server or database. This is a pain to do manually and in versions of Excel before 2007 it ...
2
votes
1
answer
15k
views
SSIS Package execution throw error DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER [duplicate]
We try to test the simple Import from Excel File saved on a shared path on a server into a SQL Table.
I created the Excel Connection Manager for the Excel source file 97-2003, First row has column ...
2
votes
2
answers
9k
views
Attempting to connect to Excel spreadsheet in C#
I am trying to pull a bunch of data from a spreadsheet, however I am not able to make a successful connection in my C# code. B
Below is the connection string and the code that I am using to make the ...
2
votes
1
answer
4k
views
ODBC connection string for multi-tenant HANA database
What will be the connection string that can be used in EXCEL VBA to connect to multi-tenant HANA database ? Currently I am using the string mentioned below but getting 10709 error:-
connectionstring =...
2
votes
1
answer
46
views
IcCube Excel Xmla opens one session (connection) per PivotTable
We have produced some Excel files using Xmla Pivot Tables against Iccube schemas.
Everything is working well except the fact that we noticed :
Each Pivot Table on a single file (even single worksheet ...
2
votes
2
answers
422
views
Excel VBA to parse SQL Connection Strings
I have an Excel VBA that connects to a SQL DB using the connection strings, but I would like to know if it's possible to parse into the connection string from a cell? For instance, if I have SQLSVR1\...
2
votes
1
answer
2k
views
Speeding up refresh time for multiple PivotTables using a single external OLAP cube
I have an Office Data Connection (ODC) pointed at an OLAP cube stored on our company's server. The connection string is fairly straightforward:
Provider=MSOLAP.6;Integrated Security=SSPI;Persist ...
2
votes
2
answers
3k
views
C# Excel INSERT Error using OleDb and the Access Database Engine
All, there are many question on this subject but none solve my problem. I have written a fairly involved routine to export a passed DataSet/DataTable to Excel (I have Office 2010 running under Win7) ...
2
votes
2
answers
6k
views
Catastrophic Failure EXCEL VBA - error '-2147418113 (8000ffff)'
I am struggling to find relevant information on the
'run-time error '-2147418113 (8000ffff)' - Catastrophic Failure'
I am experiencing.
Sub GenerateAIA_Click()
Dim SQL_query, SQL_syntax, DB_path,...
2
votes
1
answer
521
views
Excel-to-Excel data connection gives limited SQL options
I'm mainly an Excel user and only dabble into the techie/programming sides of things when I need to, so assume I'm a bit of a newbie when it comes to all these data links, but:
On a number of ...
2
votes
1
answer
2k
views
How to enable reading C# Excel files on IIS (reading them locally on the machine where IIS is running works fine)?
Got a problem with reading Excel files in C# The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine., same for 'Microsoft.ACE.OLEDB.12.0'. that only occurs when I run my app on ...
2
votes
1
answer
2k
views
Does anyone know the .net odbc driver connection string for excel 2003's xml spreadsheets?
I know this has a certain "send me teh codes" quality, but the internet has really been letting me down on this one. I have an excel file in excel 2003's xml format that I want to attach an odbc ...
2
votes
0
answers
751
views
excel connection string - relative path
I have a connection string in an Excel Spreadsheet that links to other spreadsheets. All works well. However, the file and directory are written as absolute. Can this be relative?
There are two files ...
2
votes
2
answers
597
views
Connections strings used for different versions of Excel in ASP.Net
I have created a system in ASP.Net to merge multiple excel files into one. The different connection strings that I used for this are as follows
switch (Extension)
{
case ".xls": //Excel ...
2
votes
0
answers
1k
views
Do I need to install drivers to connect to remote MYSQL database from Excel 2010 via VBA?
I am trying to build an application for my team the connects to a mysql database in Excel through vba. Below is my code to connect to the mysql database but when it runs it returns the following error:...
2
votes
0
answers
1k
views
Connecting to remote mySQL via Excel VBA
Likely a dumb question but brain isn't piecing this together---
tl;dr: My main question is how do I choose the right parameters for my connection string? How do I determine what my driver should be? ...
2
votes
1
answer
449
views
MySQL to Excel VBA
I used following:
Excel 2013
MySQL version is 5.0.67
Windows 8 64 bit
When I connect MySQL via excel VBA (I do not need ODBC connection),I got the following error.
Error Description: [Microsoft][...
2
votes
1
answer
1k
views
Change Connection String via code [closed]
I have 9 sheets that connect to different tables in teradata, each time i have to enter my user name and password to refresh and get new set of data. could someone please advice how do i write a VBA ...
2
votes
0
answers
270
views
Excel connection string for Excel created on Mac
I've been looking everywhere for the answer to this question. I have a working application that imports Excel files using Microsoft.Jet.OleDB.
Now it seems that when a user on a Mac uploads an Excel ...
1
vote
2
answers
8k
views
How to specify "Service Name" in Oracle ODBC connection string
I have an Excel macro that has an Oracle database connection. When I call the macro, it fills out user name and password but not service name. User has to enter service name manually every time.
How ...
1
vote
4
answers
2k
views
Coded UI Unit Test Excel Connection String Not Working
I am trying to use coded ui with dynamic data from an excel spreadsheet (xlsx). There seems to be an issue with my DataSource attribute. I get an error saying failed to connect to datasource. Here ...
1
vote
2
answers
9k
views
Excel VBA Connect to IBM Db2
Currently, I'm trying to query a Db2 instance from VBA but am having hard time finding proper documentation or previous stack questions that provide complete answers.
When I run the below, I receive ...
1
vote
1
answer
2k
views
ODBC xlsx driver connectionstring without header
I am connecting to xlsx files via ODBC with following command:
"DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx"
It works fine but I ...
1
vote
1
answer
591
views
Excel macro displays Type Mismatch error after upgrade to Office365
My macro works fine on a laptop with Windows 10 and Excel 2010. It also used to work fine on my desktop with Windows 10 and Excel 2010. Once my desktop got upgraded to Office 365, the macro throws a ...
1
vote
2
answers
5k
views
IMEX=1 seems to have no effect
I use ADODB to pull data from Excel file to another Excel file without opening the source. I have a strong suspicion that the IMEX=1 parameter is not accepted in my connection. I start my connection ...
1
vote
1
answer
6k
views
Change connection to external data source
I have an Excel 2013 file which shows data from an external DB2 database. The DB2 database has moved and I would like to change connection information to point to the new IP of the database.
How do I ...
1
vote
1
answer
2k
views
Reading excel data when the file is open
Few days back I asked a question but could not find enough answers. I analyzed the problem a bit more and decided to create a new thread. If I should have not, let me know or close the question.
I ...
1
vote
2
answers
4k
views
Importing Excel into DataGridView
I'm making a program where two databases are merged together.... I can import an excel spreadsheet into a DataGridView with this code:
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4....
1
vote
3
answers
3k
views
Problem with OleDbConnection string - folder name contain white space
I have problem with OleDbConnection string format. I use OleDb classes on access to Excel file.
Here is method wich load excel table to dataset.
public DataSet LoadExcelFileToDataSet(string ...