ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel data connection (https://www.excelbanter.com/excel-programming/409058-excel-data-connection.html)

GS80

Excel data connection
 
Hi all,

I have a question relating to the Excel office data connections in Excel
2007. I have a file which contains numerous embedded connections pointing to
various sheets which create table/pivot table structures. I am using this
file in an application which refreshes the data and then uses the new data to
create various outputs. The question i have surrounds the ability to change
the connection string.

I can set the command text via my application and change this as required.
The problem i have is if i want to point the sources to another server. Is
there any way that i can set up a connection sting in my app.config file and
use this to change the connection string at runtime? my app is a .Net
application using C#.

Any help on this would be much appreciated as i'm having absolutely no luck.

Thanks in advance,

G


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com