Export Connection string to Excel sheet Data Connection properities in C#
this.wb.Connections["ExcelData"].OLEDBConnection.Connection=ConnectionString;
this.wb.Connections["ExcelData"].OLEDBConnection.Connection=CommandText;
this.wb.Connections["ExcelData"].OLEDBConnection.BackgroundQuery = false;this.wb.Connections["ExcelData"].OLEDBConnection.Refresh();
Connectionstring =
'OLEDB;Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=DBName;Data Source=ServerInstanceName;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MANOJKUMARP;Use Encryption for Data=False;Tag with column collation when possible=False' CommandText ='Select * from tableName'
this.wb.Connections["ExcelData"].OLEDBConnection.Connection=ConnectionString;
this.wb.Connections["ExcelData"].OLEDBConnection.Connection=CommandText;
this.wb.Connections["ExcelData"].OLEDBConnection.BackgroundQuery = false;this.wb.Connections["ExcelData"].OLEDBConnection.Refresh();
Connectionstring =
'OLEDB;Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=DBName;Data Source=ServerInstanceName;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MANOJKUMARP;Use Encryption for Data=False;Tag with column collation when possible=False' CommandText ='Select * from tableName'
No comments :
Post a Comment